Vitaly Buka [Tue, 29 Dec 2020 03:19:38 +0000 (19:19 -0800)]
[lsan] Ignore inderect leaks referenced by suppressed blocks
This makes suppression list to work similar to __lsan_ignore_object.
Existing behavior was inconsistent and very inconvenient for complex
data structures.
Example:
struct B;
struct A { B* ptr; };
A* t = makeA();
t->ptr = makeB();
Before the patch: if makeA suppressed by suppression file, lsan will
still report the makeB() leak, so we need two suppressions.
After the patch: a single makeA suppression is enough (the same as a
single __lsan_ignore_object(t)).
Differential Revision: https://reviews.llvm.org/D93884
Fangrui Song [Thu, 31 Dec 2020 02:47:26 +0000 (18:47 -0800)]
[X86] Don't fold negative offset into 32-bit absolute address (e.g. movl $foo-1, %eax)
When building abseil-cpp `bin/absl_hash_test` with Clang in -fno-pic
mode, an instruction like `movl $foo-
2147483648, $eax` may be produced
(subtracting a number from the address of a static variable). If foo's
address is smaller than
2147483648, GNU ld/gold/LLD will error because
R_X86_64_32 cannot represent a negative value.
```
using absl::Hash;
struct NoOp {
template < typename HashCode >
friend HashCode AbslHashValue(HashCode , NoOp );
};
template <typename> class HashIntTest : public testing::Test {};
TYPED_TEST_SUITE_P(HashIntTest);
TYPED_TEST_P(HashIntTest, BasicUsage) {
if (std::numeric_limits< TypeParam >::min )
EXPECT_NE(Hash< NoOp >()({}),
Hash< TypeParam >()(std::numeric_limits< TypeParam >::min()));
}
REGISTER_TYPED_TEST_CASE_P(HashIntTest, BasicUsage);
using IntTypes = testing::Types< int32_t>;
INSTANTIATE_TYPED_TEST_CASE_P(My, HashIntTest, IntTypes);
ld: error: hash_test.cc:(function (anonymous namespace)::gtest_suite_HashIntTest_::BasicUsage<int>::TestBody(): .text+0x4E472): relocation R_X86_64_32 out of range:
18446744071564237392 is not in [0,
4294967295]; references absl::hash_internal::HashState::kSeed
```
Actually any negative offset is not allowed because the symbol address
can be zero (e.g. set by `-Wl,--defsym=foo=0`). So disallow such folding.
Reviewed By: pengfei
Differential Revision: https://reviews.llvm.org/D93931
Atmn Patel [Wed, 23 Dec 2020 02:54:21 +0000 (21:54 -0500)]
[LoopDeletion] Allows deletion of possibly infinite side-effect free loops
From C11 and C++11 onwards, a forward-progress requirement has been
introduced for both languages. In the case of C, loops with non-constant
conditionals that do not have any observable side-effects (as defined by
6.8.5p6) can be assumed by the implementation to terminate, and in the
case of C++, this assumption extends to all functions. The clang
frontend will emit the `mustprogress` function attribute for C++
functions (D86233, D85393, D86841) and emit the loop metadata
`llvm.loop.mustprogress` for every loop in C11 or later that has a
non-constant conditional.
This patch modifies LoopDeletion so that only loops with
the `llvm.loop.mustprogress` metadata or loops contained in functions
that are required to make progress (`mustprogress` or `willreturn`) are
checked for observable side-effects. If these loops do not have an
observable side-effect, then we delete them.
Loops without observable side-effects that do not satisfy the above
conditions will not be deleted.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D86844
Nico Weber [Thu, 31 Dec 2020 01:56:19 +0000 (20:56 -0500)]
[lld/mac] Add -adhoc_codesign / -no_adhoc_codesign flags
These are new in Xcode 12's ld64. lld never codesigns at the moment, so
-no_adhoc_codesign doesn't even have to warn that it's not implemented.
Kazu Hirata [Thu, 31 Dec 2020 01:45:39 +0000 (17:45 -0800)]
[Analysis] Remove unused code recursivelySimplifyInstruction (NFC)
The last use of the function, located in RemovePredecessorAndSimplify,
was removed on Dec 25, 2020 in commit
46bea9b29714ba77010612b04ba13aff56d62e7b.
The last use of RemovePredecessorAndSimplify was removed on Sep 29,
2010 in commit
99c985c37dd45dd0fbd03863037d8e93153783e6.
Kazu Hirata [Thu, 31 Dec 2020 01:45:37 +0000 (17:45 -0800)]
[PGO] Use isa instead of dyn_cast (NFC)
Kazu Hirata [Thu, 31 Dec 2020 01:45:36 +0000 (17:45 -0800)]
[ARM] Declare Op within an if statement (NFC)
Fangrui Song [Thu, 31 Dec 2020 00:58:20 +0000 (16:58 -0800)]
[ThinLTO][test] Add visibility related tests
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D92899
Fangrui Song [Thu, 31 Dec 2020 00:57:50 +0000 (16:57 -0800)]
[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.
Fangrui Song [Thu, 31 Dec 2020 00:52:23 +0000 (16:52 -0800)]
[test] Add explicit dso_local to definitions in ELF static relocation model tests
Fangrui Song [Thu, 31 Dec 2020 00:11:31 +0000 (16:11 -0800)]
[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.
Fangrui Song [Wed, 30 Dec 2020 23:47:16 +0000 (15:47 -0800)]
[test] Add explicit dso_local to definitions in ELF static relocation model tests
Lang Hames [Wed, 30 Dec 2020 04:34:44 +0000 (15:34 +1100)]
[ORC] Remove some stale debugging output.
Fangrui Song [Wed, 30 Dec 2020 23:28:10 +0000 (15:28 -0800)]
[RISCV][test] Add explicit dso_local to definitions in ELF static relocation model tests
Fangrui Song [Wed, 30 Dec 2020 23:26:09 +0000 (15:26 -0800)]
[SystemZ][test] Add explicit dso_local to definitions in ELF static relocation model tests
Fangrui Song [Wed, 30 Dec 2020 23:23:20 +0000 (15:23 -0800)]
[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.
Fangrui Song [Wed, 30 Dec 2020 23:03:06 +0000 (15:03 -0800)]
[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
Fangrui Song [Wed, 30 Dec 2020 22:44:43 +0000 (14:44 -0800)]
[test] Fix linux-preemption.ll
Fangrui Song [Wed, 30 Dec 2020 22:40:50 +0000 (14:40 -0800)]
[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.
Jacques Pienaar [Wed, 30 Dec 2020 22:16:13 +0000 (14:16 -0800)]
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)
Terry Wilmarth [Wed, 30 Dec 2020 21:39:48 +0000 (00:39 +0300)]
[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
Brandon Bergren [Wed, 30 Dec 2020 21:22:26 +0000 (15:22 -0600)]
[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
Siva Chandra Reddy [Wed, 30 Dec 2020 20:38:23 +0000 (12:38 -0800)]
[libc][NFC] Use ASSERT_FP_EQ to compare nan values in tests.
This change "fixes" one of the uses that was missed in
0524da67b448dcce6569fae0f54c10f208c2dc56.
Roman Lebedev [Wed, 30 Dec 2020 20:53:23 +0000 (23:53 +0300)]
[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
Roman Lebedev [Wed, 30 Dec 2020 20:33:55 +0000 (23:33 +0300)]
[SimplifyCFG] Teach SwitchToLookupTable() to preserve DomTree
Roman Lebedev [Wed, 30 Dec 2020 20:11:06 +0000 (23:11 +0300)]
[SimplifyCFG] Teach switchToSelect() to preserve DomTree
Roman Lebedev [Wed, 30 Dec 2020 17:48:40 +0000 (20:48 +0300)]
[SimplifyCFG] Teach SimplifyBranchOnICmpChain() to preserve DomTree
Craig Topper [Wed, 30 Dec 2020 18:41:41 +0000 (10:41 -0800)]
[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.
Fangrui Song [Wed, 30 Dec 2020 20:32:46 +0000 (12:32 -0800)]
[update_llc_test_checks] Support Windows .seh_proc for x86
Sanjay Patel [Wed, 30 Dec 2020 20:22:26 +0000 (15:22 -0500)]
[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.
Sanjay Patel [Wed, 30 Dec 2020 19:25:51 +0000 (14:25 -0500)]
[LoopVectorizer] add test to show wrong FMF propagation; NFC
Fangrui Song [Wed, 30 Dec 2020 19:59:36 +0000 (11:59 -0800)]
[update_llc_test_checks] Support .Lfunc$local for x86 -relocation-model=pic dsolocal tests
Nico Weber [Wed, 30 Dec 2020 18:57:42 +0000 (13:57 -0500)]
[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.
Yuanfang Chen [Wed, 30 Dec 2020 07:15:03 +0000 (23:15 -0800)]
Fix `LLVM_ENABLE_MODULES=On` build
for commit
480936e741d588d53b9e2d9c5935b5daa0fdee25.
Jacques Pienaar [Wed, 30 Dec 2020 18:46:01 +0000 (10:46 -0800)]
[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
Fangrui Song [Wed, 30 Dec 2020 18:32:34 +0000 (10:32 -0800)]
[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.
Max Moroz [Wed, 30 Dec 2020 18:10:23 +0000 (10:10 -0800)]
[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
Andrew Litteken [Wed, 16 Sep 2020 03:02:18 +0000 (22:02 -0500)]
[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
Fangrui Song [Wed, 30 Dec 2020 17:30:58 +0000 (09:30 -0800)]
[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
Fangrui Song [Wed, 30 Dec 2020 17:16:26 +0000 (09:16 -0800)]
[ELF] Drop '>>> defined in ' for locations of linker synthesized symbols
Reviewed By: grimar
Differential Revision: https://reviews.llvm.org/D93925
Nicolas Vasilache [Wed, 30 Dec 2020 16:42:21 +0000 (16:42 +0000)]
[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
Nicolas Vasilache [Wed, 30 Dec 2020 16:33:32 +0000 (16:33 +0000)]
[mlir] NFC - Fix SubViewOp printing
Avoid casting the source operand type allows better debugging when conversion patterns
fail to produce a proper MemRefType.
Sanjay Patel [Wed, 30 Dec 2020 16:27:23 +0000 (11:27 -0500)]
[SLP] add fadd reduction test to show broken FMF propagation; NFC
Bogdan Graur [Wed, 30 Dec 2020 14:56:29 +0000 (06:56 -0800)]
Fixes warning 'enumeration value not handled in switch'.
This was introduced in commit:
981a0bd85811fe49379fdbef35528e2c2f3511a3.
Differential Revision: https://reviews.llvm.org/D93944
Sanjay Patel [Wed, 30 Dec 2020 14:11:10 +0000 (09:11 -0500)]
[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.
Juneyoung Lee [Wed, 30 Dec 2020 14:49:09 +0000 (23:49 +0900)]
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.
Wang, Pengfei [Wed, 30 Dec 2020 14:22:13 +0000 (22:22 +0800)]
[X86][AMX] Fix compilation warning introduced by
981a0bd8.
Juneyoung Lee [Wed, 30 Dec 2020 14:05:07 +0000 (23:05 +0900)]
clang-format, address warnings
Juneyoung Lee [Tue, 29 Dec 2020 22:28:17 +0000 (07:28 +0900)]
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
Alexander Belyaev [Wed, 30 Dec 2020 13:35:25 +0000 (14:35 +0100)]
[mlir] Fix a typo MemRefType -> UnrankedMemRefType
Marek Kurdej [Wed, 30 Dec 2020 13:24:02 +0000 (14:24 +0100)]
[libc++] [docs] Mark contract-related papers as removed from C++20.
Juneyoung Lee [Wed, 30 Dec 2020 13:13:10 +0000 (22:13 +0900)]
[SimplifyCFG] Add tests for select form and/or for creating select from icmps
Juneyoung Lee [Wed, 30 Dec 2020 07:11:54 +0000 (16:11 +0900)]
[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
zhanghb97 [Mon, 14 Dec 2020 10:43:05 +0000 (18:43 +0800)]
[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
Luo, Yuanke [Wed, 30 Dec 2020 07:22:19 +0000 (15:22 +0800)]
[X86] Refactor AMX test case, remove unnecessary code.
Differential Revision: https://reviews.llvm.org/D93792
Fangrui Song [Wed, 30 Dec 2020 07:37:55 +0000 (23:37 -0800)]
Move -fno-semantic-interposition dso_local logic from TargetMachine to Clang CodeGenModule
This simplifies TargetMachine::shouldAssumeDSOLocal and and gives frontend the
decision to use dso_local. For LLVM synthesized functions/globals, they may lose
inferred dso_local but such optimizations are probably not very useful.
Note: the hasComdat() condition in canBenefitFromLocalAlias (D77429) may be dead now.
(llvm/CodeGen/X86/semantic-interposition-comdat.ll)
(Investigate whether we need test coverage when Fuchsia C++ ABI is clearer)
Andrew Litteken [Mon, 24 Aug 2020 09:25:54 +0000 (04:25 -0500)]
[IROutliner] Adding support for swift errors in the IROutliner
Since some values can be swift errors, we need to make sure that we
correctly propagate the parameter attributes.
Tests found at:
llvm/test/Transforms/IROutliner/outlining-swift-error.ll
Reviewers: jroelofs, paquette
Recommit of:
71867ed5e6606a93f0c1413f205afe3bb16317fe
Differential Revision: https://reviews.llvm.org/D87742
Andrew Litteken [Wed, 30 Dec 2020 07:15:48 +0000 (01:15 -0600)]
Revert "[IROutliner] Adding support for swift errors"
This reverts commit
71867ed5e6606a93f0c1413f205afe3bb16317fe.
Reverting for lack of commit messages.
Andrew Litteken [Mon, 24 Aug 2020 09:25:54 +0000 (04:25 -0500)]
[IROutliner] Adding support for swift errors
Juneyoung Lee [Wed, 30 Dec 2020 07:05:19 +0000 (16:05 +0900)]
[ConstraintElimination] Add tests for select form and/or (NFC)
Siva Chandra Reddy [Mon, 21 Dec 2020 17:16:41 +0000 (09:16 -0800)]
[libc] Add implementations of rounding functions which depend rounding mode.
Namely, implementations for rint, rintf, rintl, lrint, lrintf, lrintl,
llrint, llrintf and llrintl have been added.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D93889
Luo, Yuanke [Fri, 20 Nov 2020 07:19:34 +0000 (15:19 +0800)]
[X86] Add x86_amx type for intel AMX.
The x86_amx is used for AMX intrisics. <256 x i32> is bitcast to x86_amx when
it is used by AMX intrinsics, and x86_amx is bitcast to <256 x i32> when it
is used by load/store instruction. So amx intrinsics only operate on type x86_amx.
It can help to separate amx intrinsics from llvm IR instructions (+-*/).
Thank Craig for the idea. This patch depend on https://reviews.llvm.org/D87981.
Differential Revision: https://reviews.llvm.org/D91927
Fangrui Song [Wed, 30 Dec 2020 05:26:30 +0000 (21:26 -0800)]
[X86][test] Improve global address offset folding tests
Craig Topper [Wed, 30 Dec 2020 05:04:19 +0000 (21:04 -0800)]
[Verifier] Remove declaration of method that was removed 8.5 years ago. NFC
Haowei Wu [Wed, 9 Dec 2020 01:23:53 +0000 (17:23 -0800)]
[llvm-elfabi] Add flag to preserve timestamp when output is the same
This change adds '--write-if-changed' flag to llvm-elfabi tool. When
enabled, llvm-elfabi will not overwrite the existing file if the
content of the file will not be changed, which preserves the
timestamp.
Differential Revision: https://reviews.llvm.org/D92902
Stella Laurenzo [Wed, 30 Dec 2020 02:06:24 +0000 (18:06 -0800)]
[mlir][python] Install generated dialect sources.
Differential Revision: https://reviews.llvm.org/D93928
Kazu Hirata [Wed, 30 Dec 2020 03:23:24 +0000 (19:23 -0800)]
[Analysis, IR] Use *Map::lookup (NFC)
Kazu Hirata [Wed, 30 Dec 2020 03:23:22 +0000 (19:23 -0800)]
[Transforms/Utils] Construct SmallVector with iterator ranges (NFC)
Kazu Hirata [Wed, 30 Dec 2020 03:23:21 +0000 (19:23 -0800)]
[Analysis] Use llvm::append_range (NFC)
ShihPo Hung [Fri, 25 Dec 2020 02:56:24 +0000 (18:56 -0800)]
[RISCV] Add intrinsics for vcompress instruction
This patch defines vcompress intrinsics and lower to V instructions.
We work with @rogfer01 from BSC to come out this patch.
Authored-by: Roger Ferrer Ibanez <rofirrim@gmail.com>
Co-Authored-by: ShihPo Hung <shihpo.hung@sifive.com>
Differential revision: https://reviews.llvm.org/D93809
Kai Luo [Wed, 30 Dec 2020 02:23:05 +0000 (02:23 +0000)]
[PowerPC] Add mir test to show effect of `optimizeCompareInstr` when `equalityOnly` is true. NFC.
Kai Luo [Tue, 29 Dec 2020 12:11:55 +0000 (12:11 +0000)]
[PowerPC] Remaining KnownBits should be constant when performing non-sign comparison
In `PPCTargetLowering::DAGCombineTruncBoolExt`, when checking if it's correct to perform the transformation for non-sign comparison, as the comment says
```
// This is neither a signed nor an unsigned comparison, just make sure
// that the high bits are equal.
```
Origin check
```
if (Op1Known.Zero != Op2Known.Zero || Op1Known.One != Op2Known.One)
return SDValue();
```
is not strong enough. For example,
```
Op1Known = 111x000x;
Op2Known = 111x000x;
```
Bit 4, besides bit 0, is still unknown and affects the final result.
This patch fixes https://bugs.llvm.org/show_bug.cgi?id=48388.
Reviewed By: nemanjai, #powerpc
Differential Revision: https://reviews.llvm.org/D93092
Lang Hames [Tue, 29 Dec 2020 09:27:41 +0000 (20:27 +1100)]
[ORC] Move Orc RPC code into Shared, rename some RPC types.
Moves all headers from Orc/RPC to Orc/Shared, and from the llvm::orc::rpc
namespace into llvm::orc::shared. Also renames RPCTypeName to
SerializationTypeName and Function to RPCFunction.
In addition to being a more reasonable home for this code, this will make it
easier for the upcoming Orc runtime to re-use the Serialization system for
creating and parsing wrapper-function binary blobs.
Stella Laurenzo [Wed, 30 Dec 2020 01:43:04 +0000 (17:43 -0800)]
[mlir][python] Aggressively avoid name collisions in generated python ODS code.
* When porting npcomp to use these bindings, I ran into enough patterns of collisions that I decided to be somewhat draconian about not polluting the namespace.
* With these changes all of the npcomp dialects generate and pass what tests we have.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D93920
Vitaly Buka [Wed, 30 Dec 2020 01:27:53 +0000 (17:27 -0800)]
[NFC][lsan] Extract PrintResults function
Vitaly Buka [Wed, 30 Dec 2020 01:18:39 +0000 (17:18 -0800)]
[lsan] Parse suppressions just before leak reporting
Without leaks suppressions are not needed.
Haowei Wu [Wed, 30 Dec 2020 01:26:22 +0000 (17:26 -0800)]
Revert "[llvm-elfabi] Add flag to preserve timestamp when output is the same"
This reverts commit
fddb41744958d21635a60622cfb4067122810bcc. which
causes test failures on Mac builders.
Zakk Chen [Mon, 28 Dec 2020 16:44:38 +0000 (08:44 -0800)]
[RISCV] Define vsext/vzext intrinsics.
Define vsext/vzext intrinsics.and lower to V instructions.
Define new fraction register class fields in LMULInfo and a
NoReg to present invalid LMUL register classes.
Authored-by: ShihPo Hung <shihpo.hung@sifive.com>
Co-Authored-by: Zakk Chen <zakk.chen@sifive.com>
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D93893
LLVM GN Syncbot [Wed, 30 Dec 2020 00:40:53 +0000 (00:40 +0000)]
[gn build] Port
480936e741d
Yuanfang Chen [Wed, 30 Dec 2020 00:30:16 +0000 (16:30 -0800)]
Reland "[NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline" (again)
This reverts commit
16c8f6e91344ec9840d6aa9ec6b8d0c87a104ca3 with fix.
-Wswitch catched an unhandled enum value due to recent commits in
TargetPassConfig.cpp.
LLVM GN Syncbot [Wed, 30 Dec 2020 00:29:58 +0000 (00:29 +0000)]
[gn build] Port
16c8f6e9134
Yuanfang Chen [Wed, 30 Dec 2020 00:29:07 +0000 (16:29 -0800)]
Revert "Reland "[NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline""
This reverts commit
21314940c4856e0cb81b664fd2d2117d1b7dc3e3.
Build failure in some bots.
Mehdi Amini [Wed, 30 Dec 2020 00:19:31 +0000 (00:19 +0000)]
Fix DRR pattern when attributes and operands are interleaved and a dag subtree appears in the rewrite
This fixes an incorrect fatal error in TableGen. This code probably comes
from before attributes were allowed to interleave with operands in ODS.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D93915
Chris Morin [Tue, 29 Dec 2020 22:04:55 +0000 (22:04 +0000)]
[MLIR] Make ComplexType buildable if its element type is buildable
If a ComplexType's element type is buildable, then that ComplexType should be
buildable. This is accomplished by the introduction of a new ODS class called
`SameBuildabilityAs`. This can be used by other types that are conditionally
buildable.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D93892
LLVM GN Syncbot [Tue, 29 Dec 2020 23:18:48 +0000 (23:18 +0000)]
[gn build] Port
21314940c48
Yuanfang Chen [Tue, 29 Dec 2020 01:48:17 +0000 (17:48 -0800)]
Reland "[NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline"
This reverts commit
94427af60c66ffea655a3084825c6c3a9deec1ad (relands
4646de5d75cfce3da4ddeffb6eb8e66e38238800 with fix).
Use "return std::move(AsmStreamer);" instead of "return AsmStreamer;" in
LVMTargetMachine::createMCStreamer. Unlike Clang, GCC seems having trouble
inserting a implicit lvalue->rvalue conversion.
Haowei Wu [Wed, 9 Dec 2020 01:23:53 +0000 (17:23 -0800)]
[llvm-elfabi] Add flag to preserve timestamp when output is the same
This change adds '--write-if-changed' flag to llvm-elfabi tool. When
enabled, llvm-elfabi will not overwrite the existing file if the
content of the file will not be changed, which preserves the
timestamp.
Differential Revision: https://reviews.llvm.org/D92902
Peter Collingbourne [Thu, 17 Dec 2020 23:34:49 +0000 (15:34 -0800)]
CrashReason: Add MTE tag check faults to the list of crash reasons.
As of Linux 5.10, the kernel may report either of the two following
crash reasons:
- SEGV_MTEAERR: async MTE tag check fault
- SEGV_MTESERR: sync MTE tag check fault
Teach LLDB about them.
Differential Revision: https://reviews.llvm.org/D93495
Jacques Pienaar [Tue, 29 Dec 2020 22:20:19 +0000 (14:20 -0800)]
[mlir] Add error message when failing to add pass
Ran into failure without any error message previously here.
Differential Revision: https://reviews.llvm.org/D93910
Siddharth Krishna [Tue, 29 Dec 2020 22:14:08 +0000 (14:14 -0800)]
[mlir][Python] Add an Operation.name property
Reviewed By: stellaraccident, mehdi_amini
Differential Revision: https://reviews.llvm.org/D93474
Stella Laurenzo [Tue, 29 Dec 2020 22:10:31 +0000 (14:10 -0800)]
[mlir][python] Add Operation.verify().
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D93913
Vitaly Buka [Tue, 29 Dec 2020 02:58:11 +0000 (18:58 -0800)]
[NFC][lsan] Add nested leak in test
Vitaly Buka [Tue, 29 Dec 2020 01:45:54 +0000 (17:45 -0800)]
[NFC][sanitizer] Add SortAndDedup function
Vitaly Buka [Tue, 29 Dec 2020 01:16:49 +0000 (17:16 -0800)]
[NFC][sanitizer] Simplify InternalLowerBound
Vitaly Buka [Tue, 29 Dec 2020 00:25:45 +0000 (16:25 -0800)]
[tsan] Remove stdlib.h from dd_interceptors.cpp
This fixes "realpath already defined" error.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D93877
Jacques Pienaar [Tue, 29 Dec 2020 21:59:53 +0000 (13:59 -0800)]
[mlir] Skip empty op-pipelines in inliner textual opt parsing
Avoids failing on cases like
inline{default-pipeline=canonicalize max-iterations=4 op-pipelines=},
as produced by crash reproducer.
Andrew Litteken [Mon, 24 Aug 2020 09:21:38 +0000 (04:21 -0500)]
[IROutliner] Adding OptRemarks to the IROutliner Pass
This prints OptRemarks at each location where a decision is made to not
outline, or to outline a specific section for the IROutliner pass.
Test:
llvm/test/Transforms/IROutliner/opt-remarks.ll
Reviewers: jroelofs, paquette
Differential Revision: https://reviews.llvm.org/D87300
Roman Lebedev [Tue, 29 Dec 2020 21:41:57 +0000 (00:41 +0300)]
[SimplifyCFG] Teach SimplifyTerminatorOnSelect() to preserve DomTree
Roman Lebedev [Tue, 29 Dec 2020 21:21:32 +0000 (00:21 +0300)]
[SimplifyCFG] Teach SimplifyCondBranchToCondBranch() to preserve DomTree
Roman Lebedev [Tue, 29 Dec 2020 20:45:54 +0000 (23:45 +0300)]
[SimplifyCFG] Teach mergeConditionalStoreToAddress() to preserve DomTree