Commit Graph

376076 Commits

Author SHA1 Message Date
Kazu Hirata a87c7003ac [Analysis] Remove unused code recursivelySimplifyInstruction (NFC)
The last use of the function, located in RemovePredecessorAndSimplify,
was removed on Dec 25, 2020 in commit
46bea9b297.

The last use of RemovePredecessorAndSimplify was removed on Sep 29,
2010 in commit 99c985c37d.
2020-12-30 17:45:40 -08:00
Kazu Hirata 95ea86587c [PGO] Use isa instead of dyn_cast (NFC) 2020-12-30 17:45:38 -08:00
Kazu Hirata 331c28f60d [ARM] Declare Op within an if statement (NFC) 2020-12-30 17:45:36 -08:00
Fangrui Song 52aa4e2107 [ThinLTO][test] Add visibility related tests
Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D92899
2020-12-30 16:58:20 -08:00
Fangrui Song 2047c10c22 [TargetMachine] Drop implied dso_local for definitions in ELF static relocation model/PIE
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Since clang -fno-pic add the dso_local specifier, we don't need to special case.
2020-12-30 16:57:50 -08:00
Fangrui Song bf1160c1d6 [test] Add explicit dso_local to definitions in ELF static relocation model tests 2020-12-30 16:52:23 -08:00
Fangrui Song f731839584 [LowerEmuTls] Copy dso_local from <var> to __emutls_v.<var>
This effect is not testable until we drop the implied dso_local for ELF
static/PIE defined symbols from TargetMachine::shouldAssumeDSOLocal.
2020-12-30 16:11:32 -08:00
Fangrui Song a964e0f085 [test] Add explicit dso_local to definitions in ELF static relocation model tests 2020-12-30 15:47:16 -08:00
Lang Hames a14c955af8 [ORC] Remove some stale debugging output. 2020-12-31 10:34:38 +11:00
Fangrui Song 7e5508e6a8 [RISCV][test] Add explicit dso_local to definitions in ELF static relocation model tests 2020-12-30 15:28:11 -08:00
Fangrui Song a90e5a8f0d [SystemZ][test] Add explicit dso_local to definitions in ELF static relocation model tests 2020-12-30 15:26:09 -08:00
Fangrui Song a64b89e69e [ARM][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fno-pic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.
2020-12-30 15:23:21 -08:00
Fangrui Song 7b529d0411 [AArch64][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fno-pic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.

Split tiny_model.ll to tiny-model-{static,pic}.ll
2020-12-30 15:03:06 -08:00
Fangrui Song e0f70ee01c [test] Fix linux-preemption.ll 2020-12-30 14:44:43 -08:00
Fangrui Song 871de4a479 [X86][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fno-pic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.
2020-12-30 14:40:50 -08:00
Jacques Pienaar 8c1f553844 Avoid using /dev/null in test
Windows build bot was not happy with this
(http://lab.llvm.org:8011/#/builders/13/builds/3327/steps/7/logs/FAIL__MLIR__run-reproducer_mlir)
2020-12-30 14:16:13 -08:00
Terry Wilmarth 6b316febb4 [OpenMP] libomp: Handle implicit conversion warnings
This patch partially prepares the runtime source code to be built with
-Wconversion, which should trigger warnings if any implicit conversions
can possibly change a value. For builds done with icc or gcc, all such
warnings are handled in this patch. clang gives a much longer list of
warnings, particularly for sign conversions, which the other compilers
don't report. The -Wconversion flag is commented into cmake files, but
I'm not going to turn it on. If someone thinks it is important, and wants
to fix all the clang warnings, they are welcome to.

Types of changes made here involve either improving the consistency of types
used so that no conversion is needed, or else performing careful explicit
conversions, when we're sure a problem won't arise.

Patch is a combination of changes by Terry Wilmarth and Johnny Peyton.

Differential Revision: https://reviews.llvm.org/D92942
2020-12-31 00:39:57 +03:00
Brandon Bergren f07b95e8bc [PowerPC] Add addtional test that retroactively catches PR47259
Due to the unfortunate way the bug could only be triggered when reading SPRG[0-3] into a register lower than %r4 with the "mfsprg %rX, 0" syntax, the tests did not detect it.

(It could not be triggered for "mfsprg0, %r2" because that pattern was already in the table, so the earlier "correct" match took effect)

As a canary, add an intentionally ambiguous "mfsprg 2, 2" and "mtsprg 2, 2" check that would have caught the problem.

Reviewed By: ZhangKang

Differential Revision: https://reviews.llvm.org/D86489
2020-12-30 15:23:48 -06:00
Siva Chandra Reddy cc07d52511 [libc][NFC] Use ASSERT_FP_EQ to compare nan values in tests.
This change "fixes" one of the uses that was missed in
0524da67b4.
2020-12-30 13:06:40 -08:00
Roman Lebedev 51879a5256
[LoopIdiom] 'left-shift until bittest': don't forget to check that PHI node is in loop header
Fixes an issue reported by Peter Collingbourne in
https://reviews.llvm.org/D91726#2475301
2020-12-30 23:58:41 +03:00
Roman Lebedev 7f221c9196
[SimplifyCFG] Teach SwitchToLookupTable() to preserve DomTree 2020-12-30 23:58:41 +03:00
Roman Lebedev a17025aa61
[SimplifyCFG] Teach switchToSelect() to preserve DomTree 2020-12-30 23:58:40 +03:00
Roman Lebedev c45f765c0d
[SimplifyCFG] Teach SimplifyBranchOnICmpChain() to preserve DomTree 2020-12-30 23:58:40 +03:00
Craig Topper 253dc16f9e [RISCV] Cleanup some V intrinsic names used in tests to match the type overloads used. Add some missing double tests on rv32. NFC
The matching for intrinsic names is forgiving about types in the
name being absent or wrong. Once the intrinsic is parsed its
name will remangled to include the real types.

This commit fixes the names to have at least enough correct types
so that the name used in the test is a prefix of the canonical name.
The big missing part is the type for the VL parameter which changes
size between rv32 and rv64.

While I was in here I noticed that we were missing some tests for
double on rv32 so I fixed that by copying from rv64 and fixing up
the VL argument type.
2020-12-30 12:37:11 -08:00
Fangrui Song 7181df1e49 [update_llc_test_checks] Support Windows .seh_proc for x86 2020-12-30 12:32:47 -08:00
Sanjay Patel 8ca60db40b [LoopUtils] reduce FMF and min/max complexity when forming reductions
I don't know if there's some way this changes what the vectorizers
may produce for reductions, but I have added test coverage with
3567908 and 5ced712 to show that both passes already have bugs in
this area. Hopefully this does not make things worse before we can
really fix it.
2020-12-30 15:22:26 -05:00
Sanjay Patel 5ced712e98 [LoopVectorizer] add test to show wrong FMF propagation; NFC 2020-12-30 15:13:57 -05:00
Fangrui Song 294a196b04 [update_llc_test_checks] Support .Lfunc$local for x86 -relocation-model=pic dsolocal tests 2020-12-30 11:59:36 -08:00
Nico Weber 51a292d994 [gn build] Switch copy_bundle_data from pax to cpio
This will hopefully fix the build not becoming clean when using Ninja
1.9+. Ninja 1.9 enabled high-resolution time stamps, but pax doesn't
correctly set high-resolution timestamps on its output.

See https://github.com/nico/hack/blob/master/notes/copydir.md for a
detailed writeup of problem and alternatives.
2020-12-30 13:59:03 -05:00
Yuanfang Chen 277ebe46c6 Fix `LLVM_ENABLE_MODULES=On` build
for commit 480936e741.
2020-12-30 10:54:04 -08:00
Jacques Pienaar 453b6aadce [mlir] Add option to read reproducer options from file
Add command line option to read the configuration dumped by the MLIR crash
reproducer and adds those to the other command line options parsed by mlir-opt.

Simple convenience that enables `mlir-opt --run-reproducer /tmp/repro.mlir`
instead of needing to copy&paste the configuration.

Differential Revision: https://reviews.llvm.org/D93924
2020-12-30 10:46:01 -08:00
Fangrui Song 88cadb894c [PowerPC][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fpic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.

Rewrite preemption.ll to dsolocal-static.ll and dsolocal-pic.ll, and add
"PIC Level" metadata.
2020-12-30 10:32:34 -08:00
Max Moroz 70de7e0d9a [compiler-rt] FuzzedDataProvider: Add PickValueInArray for std::array
This makes `PickValueInArray` work for `std::array<T, s>` (C++11). I've also tested the C++17 `std::array` (with compiler-deduced template parameters)

```
Author:
MarcoFalke <falke.marco@gmail.com>
```

Reviewed By: Dor1s

Differential Revision: https://reviews.llvm.org/D93412
2020-12-30 10:25:26 -08:00
Andrew Litteken fe431103b6 [IROutliner] Adding option to enable outlining from linkonceodr functions
There are functions that the linker is able to automatically
deduplicate, we do not outline from these functions by default. This
allows for outlining from those functions.

Tests:
llvm/test/Transforms/IROutliner/outlining-odr.ll

Reviewers: jroelofs, paquette

Differential Revision: https://reviews.llvm.org/D87309
2020-12-30 12:08:04 -06:00
Fangrui Song 9c0c123b0b [CMake][tsan] Remove --sysroot=.
rL254966 added `--sysroot=.` to prevent accidental including system headers.
It caused hassle to FreeBSD (D17383)/NetBSD. The next problem is that
we want to include `features.h` (usually `/usr/include/features.h`) to detect `__GLIBC__`.

At this point it seems that `--sysroot=.` adds lots of inconvenience so we disable it for now.
If there is a better way preventing accidental system header inclusion we can consider it again.

Reviewed By: #sanitizers, vitalybuka

Differential Revision: https://reviews.llvm.org/D93921
2020-12-30 09:30:58 -08:00
Fangrui Song b0d6bebe90 [ELF] Drop '>>> defined in ' for locations of linker synthesized symbols
Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D93925
2020-12-30 09:16:26 -08:00
Nicolas Vasilache 9b5a3d67b4 [mlir] Fix indexing of first offset operand in ops that implement OffsetSizeAndStrideOpInterface
OffsetSizeAndStrideOpInterface ops may have a varying number of operands before the first
offset operand. This revision adds a method that such ops much implement to properly specify
the position of the first offset operand.

Differential Revision: https://reviews.llvm.org/D93947
2020-12-30 16:44:26 +00:00
Nicolas Vasilache ed507bc4d5 [mlir] NFC - Fix SubViewOp printing
Avoid casting the source operand type allows better debugging when conversion patterns
fail to produce a proper MemRefType.
2020-12-30 16:34:37 +00:00
Sanjay Patel 3567908d8c [SLP] add fadd reduction test to show broken FMF propagation; NFC 2020-12-30 11:27:50 -05:00
Bogdan Graur 2016f2c8a7 Fixes warning 'enumeration value not handled in switch'.
This was introduced in commit: 981a0bd858.

Differential Revision: https://reviews.llvm.org/D93944
2020-12-30 06:56:29 -08:00
Sanjay Patel e90ea76380 [IR] remove 'NoNan' param when creating FP reductions
This is no-functional-change-intended (AFAIK, we can't
isolate this difference in a regression test).

That's because the callers should be setting the IRBuilder's
FMF field when creating the reduction and/or setting those
flags after creating. It doesn't make sense to override this
one flag alone.

This is part of a multi-step process to clean up the FMF
setting/propagation. See PR35538 for an example.
2020-12-30 09:51:23 -05:00
Juneyoung Lee c6035a7bdf Remove functions from *-inseltpoison.ll tests if unnecessary
X-inseltpoison.ll is a copy of X.ll with insertelement/shufflevector's
placeholder replaced with poison.
This commit removes a few redundant functions which do not contain any
shufflevector/insertelement.
2020-12-30 23:50:37 +09:00
Wang, Pengfei 16c2067cf2 [X86][AMX] Fix compilation warning introduced by 981a0bd8. 2020-12-30 22:22:13 +08:00
Juneyoung Lee 420d046d6b clang-format, address warnings 2020-12-30 23:05:07 +09:00
Juneyoung Lee 9b29610228 Use unary CreateShuffleVector if possible
As mentioned in D93793, there are quite a few places where unary `IRBuilder::CreateShuffleVector(X, Mask)` can be used
instead of `IRBuilder::CreateShuffleVector(X, Undef, Mask)`.
Let's update them.

Actually, it would have been more natural if the patches were made in this order:
(1) let them use unary CreateShuffleVector first
(2) update IRBuilder::CreateShuffleVector to use poison as a placeholder value (D93793)

The order is swapped, but in terms of correctness it is still fine.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D93923
2020-12-30 22:36:08 +09:00
Alexander Belyaev e47e313d64 [mlir] Fix a typo MemRefType -> UnrankedMemRefType 2020-12-30 14:35:25 +01:00
Marek Kurdej 3f0b637d6b [libc++] [docs] Mark contract-related papers as removed from C++20. 2020-12-30 14:24:26 +01:00
Juneyoung Lee e6e6404600 [SimplifyCFG] Add tests for select form and/or for creating select from icmps 2020-12-30 22:15:39 +09:00
Juneyoung Lee bfedd5d2b6 [ConstraintElimination] Add support for select form of and/or
This patch adds support for select form of and/or.
Currently there is an ongoing effort for moving towards using `select a, b, false` instead of `and i1 a, b` and
`select a, true, b` instead of `or i1 a, b` as well.
D93065 has links to relevant changes.

Alive2 proof: (undef input was disabled due to timeout :( )
- and: https://alive2.llvm.org/ce/z/AgvFbQ
- or: https://alive2.llvm.org/ce/z/KjLJyb

Differential Revision: https://reviews.llvm.org/D93935
2020-12-30 21:27:36 +09:00
zhanghb97 abb4cd3e74 [mlir][Python] Initial Affine Map Python Bindings.
- Add `PyAffineMap` to wrap around `MlirAffineMap`.
- Add `mlirPythonAffineMapToCapsule` and `mlirPythonCapsuleToAffineMap` to interoperate with python capsule.
- Add and test some simple bindings of `PyAffineMap`.

Differential Revision: https://reviews.llvm.org/D93200
2020-12-30 17:36:39 +08:00