Richard Smith [Mon, 16 Nov 2020 01:40:57 +0000 (17:40 -0800)]
PR48169: Fix crash generating debug info for class non-type template
parameters.
It appears that LLVM isn't able to generate a DW_AT_const_value for a
constant of class type, but if it could, we'd match GCC's debug info in
this case, and in the interim we no longer crash.
Sanjay Patel [Sun, 15 Nov 2020 20:43:34 +0000 (15:43 -0500)]
[InstCombine] reduce code for flip of masked bit; NFC
There are 1-2 potential follow-up NFC commits to reduce
this further on the way to generalizing this for vectors.
The operand replacing path should be dead code because demanded
bits handles that more generally (D91415).
Sanjay Patel [Sun, 15 Nov 2020 20:08:41 +0000 (15:08 -0500)]
[InstCombine] add multi-use demanded bits fold for add with low-bit mask
I noticed an add example like the one from D91343, so here's a similar patch.
The logic is based on existing code for the single-use demanded bits fold.
But I only matched a constant instead of using compute known bits on the
operands because that was the motivating patterni that I noticed.
I think this will allow removing a special-case (but incomplete) dedicated
fold within visitAnd(), but I need to untangle the existing code to be sure.
https://rise4fun.com/Alive/V6fP
Name: add with low mask
Pre: (C1 & (-1 u>> countLeadingZeros(C2))) == 0
%a = add i8 %x, C1
%r = and i8 %a, C2
=>
%r = and i8 %x, C2
Differential Revision: https://reviews.llvm.org/D91415
Sanjay Patel [Sun, 15 Nov 2020 19:57:01 +0000 (14:57 -0500)]
[InstCombine] add vector tests for multi-use demanded bits; NFC
See D91415.
Martin Storsjö [Sat, 14 Nov 2020 07:33:36 +0000 (09:33 +0200)]
[OpenMP] Fix building for windows after adding omp_calloc
Differential Revision: https://reviews.llvm.org/D91478
Nikita Popov [Sun, 15 Nov 2020 19:29:53 +0000 (20:29 +0100)]
[AA] Add missing AAQI parameter
This alias() call did not pass on the AAQueryInfo.
Florian Hahn [Sun, 15 Nov 2020 17:59:02 +0000 (17:59 +0000)]
[MemorySSA] Add pointer decrement loop clobber test case.
faisalv [Sun, 15 Nov 2020 17:13:57 +0000 (11:13 -0600)]
[NFC, Refactor] Modernize the TypeSpecifierWidth enum (Specifiers.h) to a scoped enum
Reviewed here: https://reviews.llvm.org/D91409 by Aaron.
Highlights of the review:
- avoid an underlying type for enums
- avoid enum bit fields (MSVC packing anomalies) and favor static_casts to unsigned bit-fields
Patch by Thorsten Schuett <schuett@gmail.com> w some minor fixes in SemaType.cpp where a couple asserts had to be repaired to deal with lack of implicit coversion to int.
Thanks Thorsten!
Aaron Puchert [Sun, 15 Nov 2020 17:02:09 +0000 (18:02 +0100)]
Consistent spelling in diagnostics: {l,r}value instead of {l,r}-value
As Richard Smith pointed out in the review of D90123, both the C and C++
standard call it lvalue and rvalue, so let's stick to the same spelling
in Clang.
Aaron Puchert [Sun, 15 Nov 2020 15:11:23 +0000 (16:11 +0100)]
[Sema] Improve notes for value category mismatch in overloading
When an overloaded member function has a ref-qualifier, like:
class X {
void f() &&;
void f(int) &;
};
we would print strange notes when the ref-qualifier doesn't fit the value
category:
X x;
x.f();
X().f(0);
would both print a note "no known conversion from 'X' to 'X' for object
argument" on their relevant overload instead of pointing out the
mismatch in value category.
At first I thought the solution is easy: just use the FailureKind member
of the BadConversionSequence struct. But it turns out that we weren't
properly setting this for function arguments. So I went through
TryReferenceInit to make sure we're doing that right, and found a number
of notes in the existing tests that improved as well.
Fixes PR47791.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D90123
Marek Kurdej [Sun, 15 Nov 2020 15:17:52 +0000 (16:17 +0100)]
[gcc] Fix -Wempty-body warning. NFC.
Florian Hahn [Sun, 15 Nov 2020 14:57:47 +0000 (14:57 +0000)]
[VPlan] Use VPValue def for VPWidenGEPRecipe.
This patch turns VPWidenGEPRecipe into a VPValue and uses it
during VPlan construction and codegeneration instead of the plain IR
reference where possible.
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D84683
Paul C. Anagnostopoulos [Sat, 14 Nov 2020 21:11:15 +0000 (16:11 -0500)]
[TableGen] Improve a couple of descriptions in the command guide
Differential Revision: https://reviews.llvm.org/D91484
Yaxun (Sam) Liu [Fri, 13 Nov 2020 14:43:35 +0000 (09:43 -0500)]
Fix temporary file name on Windows
Bound arch may contain ':', which is invalid in Windows file names.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D91421
Simon Pilgrim [Sun, 15 Nov 2020 12:56:32 +0000 (12:56 +0000)]
[Sema] Use isa<> instead of dyn_cast<> as pointer is never dereferenced. NFCI.
We are only checking for the class type. Fixes Wshadow warnings.
Christian Sigg [Fri, 13 Nov 2020 16:22:41 +0000 (17:22 +0100)]
[mlir] NFC: tiny fix in comment.
Reviewed By: ftynse, mehdi_amini
Differential Revision: https://reviews.llvm.org/D91430
Nikita Popov [Sun, 15 Nov 2020 09:19:44 +0000 (10:19 +0100)]
Revert "[SCEV] Factor out part of wrap flag detection logic [NFC-ish]"
This reverts commit
1ec6e1eb8a084bffae8a40236eb9925d8026dd07.
This change causes a significant compile-time regression:
https://llvm-compile-time-tracker.com/compare.php?from=
dd0b8b94d0796bd895cc998dd163b4fbebceb0b8&to=
1ec6e1eb8a084bffae8a40236eb9925d8026dd07&stat=instructions
I assume that this is due to the non-NFC part of the change, which
now performs expensive nowrap inference even for nowrap flags that
are not used by the particular code.
Vitaly Buka [Sun, 15 Nov 2020 07:22:57 +0000 (23:22 -0800)]
[sanitizer] Fix setup of android-thread-properties-api
Philip Reames [Sun, 15 Nov 2020 03:15:46 +0000 (19:15 -0800)]
[SCEV] Factor out part of wrap flag detection logic [NFC-ish]
In an effort to make code around flag determination more readable, and (possibly) prepare for a follow up change, factor out some of the flag detection logic. In the process, reduce the number of locations we mutate wrap flags by a couple.
Note that this isn't NFC. The old code tried for NSW xor (NUW || NW). This is, two different paths computed different sets of wrap flags. The new code will try for all three. The result is that some expressions end up with a few extra flags set.
Vitaly Buka [Sun, 15 Nov 2020 02:43:24 +0000 (18:43 -0800)]
[sanitizer] Add timeouts for adb calls
Arthur Eubanks [Sat, 14 Nov 2020 07:40:33 +0000 (23:40 -0800)]
[DCE] Port -redundant-dbg-inst-elim to NPM
This is used to test RemoveRedundantDbgInstrs(), which is used by other
passes.
Reviewed By: ychen
Differential Revision: https://reviews.llvm.org/D91477
Vassil Vassilev [Sat, 14 Nov 2020 21:32:23 +0000 (21:32 +0000)]
Add forgotten in 888d06d file.
Vassil Vassilev [Sat, 14 Nov 2020 21:29:18 +0000 (21:29 +0000)]
Move the test compiler setup in a common place. NFCI
This patch reduces the copy paste in the unittest/CodeGen folder by moving the
common compiler setup phase in a header file.
Differential revision: https://reviews.llvm.org/D91061
Florian Hahn [Fri, 13 Nov 2020 14:15:53 +0000 (14:15 +0000)]
Recommit "[VPlan] Use VPValue def for VPWidenSelectRecipe."
This reverts the revert commit
c8d73d939fa4fda9c87b3979225d02d63062bd68.
It includes a fix for cases where we missed inserting VPValues
for some selects, which should fix PR48142.
Jacques Pienaar [Sat, 14 Nov 2020 19:25:24 +0000 (11:25 -0800)]
[mlir] Add passes to passes.md to cleanup empty tabs on website index
David Green [Sat, 14 Nov 2020 18:30:17 +0000 (18:30 +0000)]
[AArch64] Remove unused check prefixes. NFC
Jacques Pienaar [Sat, 14 Nov 2020 18:29:01 +0000 (10:29 -0800)]
[mlir][shape] Make attr-dict placement consistent
Also follows what we do in std ops too and move it before :.
Fangrui Song [Sat, 14 Nov 2020 17:53:34 +0000 (09:53 -0800)]
[Driver][test] Fix cc1-spawnprocess.c
Paul C. Anagnostopoulos [Sat, 14 Nov 2020 17:37:48 +0000 (12:37 -0500)]
[TableGen] Fix missing braces in if statement
Mehdi Amini [Sat, 14 Nov 2020 16:57:28 +0000 (16:57 +0000)]
Fix build (`ninja check` without running `ninja` first)
9218ff50f9 removed the BUILD.txt file, and as a subtle side-effect
libLLVMFrontendOpenACC wasn't a dependency of `ninja check` anymore.
However llvm-config requires all components to be built, and the
relevant test is broken when libLLVMFrontendOpenACC isn't built.
Unittest for libLLVMFrontendOpenACC are pending, but this addition
should fix some bots in the meantime.
Nathan James [Sat, 14 Nov 2020 15:55:09 +0000 (15:55 +0000)]
[llvm][NFC] Remove unnecessary vector creation in Annotations
Nikita Popov [Sat, 14 Nov 2020 15:48:41 +0000 (16:48 +0100)]
[BasicAA] Remove unnecessary size limitation
We're dropping a common offset from both GEPs here. It's not
necessary for the access sizes to be the same as well.
David Green [Sat, 14 Nov 2020 15:37:53 +0000 (15:37 +0000)]
[ARM] Remove more unused check prefixes, NFC
Nico Weber [Sat, 14 Nov 2020 15:23:22 +0000 (10:23 -0500)]
Fix build after
54f9ee334
Nico Weber [Sat, 14 Nov 2020 15:12:01 +0000 (10:12 -0500)]
[gn build] (manually) merge
e51631ca4cf
Paul C. Anagnostopoulos [Thu, 22 Oct 2020 06:58:49 +0000 (02:58 -0400)]
[TableGen] Add frontend/backend phase timing capability.
Describe in the BackEnd Developer's Guide. Instrument a few backends.
Remove an old unused timing facility. Add a null backend for timing
the parser.
Differential Revision: https://reviews.llvm.org/D91388
Nathan James [Sat, 14 Nov 2020 14:03:35 +0000 (14:03 +0000)]
[NFC] Small refactor to CompilationDatabase
Sanjay Patel [Sat, 14 Nov 2020 13:04:14 +0000 (08:04 -0500)]
[CostModel] make default size cost for libcalls small (again)
This was changed recently with D90554 /
f7eac51b9b3f
...because we had a regression testing blindspot for intrinsics
that are expected to be lowered to libcalls.
In general, we want the *size* cost for a scalar call to be cheap
even if the other costs are expensive - we expect it to just be
a branch with some optional stack manipulation.
It is likely that we will want to carve out some
exceptions/overrides to this rule as follow-up patches for
calls that have some general and/or target-specific difference
to the expected lowering.
This was noticed as a regression in unrolling, so we have a test
for that now along with a couple of direct cost model tests.
If the assumed scalarization costs for the oversized vector
calls are not realistic, that would be another follow-up
refinement of the cost models.
Sanjay Patel [Fri, 13 Nov 2020 23:01:39 +0000 (18:01 -0500)]
[CostModel] add tests for math library calls; NFC
Arnold Schwaighofer [Sat, 14 Nov 2020 01:57:22 +0000 (17:57 -0800)]
[Coroutines] Make sure that async coroutine context size is a multiple of the alignment requirement
This simplifies the code the allocator has to executed
Differential Revision: https://reviews.llvm.org/D91471
mydeveloperday [Sat, 14 Nov 2020 12:37:52 +0000 (12:37 +0000)]
[git-clang-format] Process CUDA header files
Clang supports compiling CUDA source files,
CUDA header files may contain CUDA specific code
that is why they have special extension, which
can be recognized by nvcc (CUDA compiler driver)
as CUDA source file.
Format them by default as well.
Reviewed By: MyDeveloperDay
Patch By: tomilov
Differential Revision: https://reviews.llvm.org/D90780
Paul C. Anagnostopoulos [Fri, 13 Nov 2020 15:31:53 +0000 (10:31 -0500)]
[TableGen] Clean up more .td files
Differential Revision: https://reviews.llvm.org/D91431
Roman Lebedev [Sat, 14 Nov 2020 06:44:14 +0000 (09:44 +0300)]
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
See discussion in https://bugs.llvm.org/show_bug.cgi?id=45073 / https://reviews.llvm.org/D66324#2334485
the implementation is known-broken for certain inputs,
the bugreport was up for a significant amount of timer,
and there has been no activity to address it.
Therefore, just completely rip out all of misexpect handling.
I suspect, fixing it requires redesigning the internals of MD_misexpect.
Should anyone commit to fixing the implementation problem,
starting from clean slate may be better anyways.
This reverts commit
7bdad08429411e7d0ecd58cd696b1efe3cff309e,
and some of it's follow-ups, that don't stand on their own.
Vitaly Buka [Sat, 14 Nov 2020 09:52:44 +0000 (01:52 -0800)]
[sanitizer] Fix Android API level parsing on arm
Fangrui Song [Sat, 14 Nov 2020 09:16:16 +0000 (01:16 -0800)]
Make -fintegrated-cc1 work with cc1as
Tested 0.018s faster on my machine.
Vitaly Buka [Sat, 14 Nov 2020 08:02:29 +0000 (00:02 -0800)]
[sanitizer] Fix test on arm 32bit
Make test values suitable for PC alignment arithmetic used
in StackTrace::Print().
Craig Topper [Sat, 14 Nov 2020 07:29:05 +0000 (23:29 -0800)]
[RISCV] Add test cases for fsrw/fslw that don't sign extend the result. NFC
These currently fail to select fsrw/fslw.
Arthur Eubanks [Sat, 14 Nov 2020 07:29:36 +0000 (23:29 -0800)]
[test] Fix const-addr-no-neg-offset.ll under NPM
Roland McGrath [Sat, 14 Nov 2020 06:22:54 +0000 (22:22 -0800)]
[scudo/standalone] Fix leak in ThreadedGlobalQuarantine test
This unit test code was using malloc without a corresponding free.
When the system malloc is not being overridden by the code under
test, it might an asan/lsan allocator that notices leaks.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D91472
Zinovy Nis [Sun, 8 Nov 2020 18:01:45 +0000 (21:01 +0300)]
[clang-tidy] Fix crash in bugprone-redundant-branch-condition on ExprWithCleanups
Bug: https://bugs.llvm.org/show_bug.cgi?id=48008
Differential Revision: https://reviews.llvm.org/D91037
Mehdi Amini [Sat, 14 Nov 2020 04:14:05 +0000 (04:14 +0000)]
Revert "Switch libLLVMFrontendOpenACC to be a regular CMake library and not a "component""
This reverts commit
e7ed27653292b2ec545e87204031282b4b237754.
Build is broken with -DLLVM_LINK_LLVM_DYLIB=ON
Jonas Devlieghere [Sat, 14 Nov 2020 04:01:18 +0000 (20:01 -0800)]
[lldb] Mark command-process-connect as unsupported on Windows
Windows doesn't support remote connections.
Aart Bik [Sat, 14 Nov 2020 02:11:47 +0000 (18:11 -0800)]
[mlir] refactor common idiom into AffineMap method
motivated by a refactoring in the new sparse code (yet to be merged), this avoids some lengthy code dup
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D91465
Mehdi Amini [Sat, 14 Nov 2020 02:18:18 +0000 (02:18 +0000)]
Switch libLLVMFrontendOpenACC to be a regular CMake library and not a "component"
This library is only used in Flang at the moment and not tested withing LLVM.
Having it as a component is breaking llvm-config:
$ bin/llvm-config --shared-mode
llvm-config: error: component libraries and shared library
llvm-config: error: missing: [...]/lib/libLLVMFrontendOpenACC.a
This will reverted when unit-tests are provided for it.
Reviewed By: clementval
Differential Revision: https://reviews.llvm.org/D91470
Jonas Devlieghere [Sat, 14 Nov 2020 01:30:34 +0000 (17:30 -0800)]
[lldb] Make `process connect` behave the same in sync and async mode.
I think the check for whether the process is connected is totally bogus
in the first place, but on the off-chance that's it's not, we should
behave the same in synchronous and asynchronous mode.
Mehdi Amini [Fri, 13 Nov 2020 22:37:25 +0000 (22:37 +0000)]
Add an assertion in SmallVector::push_back()
This assertion ensures the input value isn't part of the vector when
growing is required. In such cases the vector will grow and the input
value is invalidated before being read from.
This found 14 failed Tests.
Reviewed By: bkramer
Differential Revision: https://reviews.llvm.org/D84293
Mehdi Amini [Sat, 14 Nov 2020 00:46:30 +0000 (00:46 +0000)]
Replace sequences of v.push_back(v[i]); v.erase(&v[i]); with std::rotate (NFC)
The code has a few sequence that looked like:
Ops.push_back(Ops[0]);
Ops.erase(Ops.begin());
And are equivalent to:
std::rotate(Ops.begin(), Ops.begin() + 1, Ops.end());
The latter has the advantage of never reallocating the vector, which
would be a bug in the original code as push_back would read from the
memory it deallocated.
Sean Silva [Fri, 13 Nov 2020 23:27:29 +0000 (15:27 -0800)]
[mlir] Make linalg-bufferize run on FuncOp
That way, it runs in parallel across functions.
Peter Steinfeld [Fri, 13 Nov 2020 17:31:41 +0000 (09:31 -0800)]
[flang] Fix "EQ" comparison of arrays
When comparing arrays whose shapes do not conform, the contant folding
code ran into problems trying to get the value of an extent that did not
exist. There were actually two problems. First, the routine
"CheckConformance()" was returning "true" when the compiler was unable
to get the extent of an array. Second, the function
"ApplyElementwise()" was calling "CheckConformance()" prior to folding
the elements of two arrays, but it was ignoring the return value.
Differential Revision: https://reviews.llvm.org/D91440
Arthur Eubanks [Thu, 12 Nov 2020 21:40:03 +0000 (13:40 -0800)]
[MemProf][NewPM] Make memprof passes required
Just like other sanitizers.
Fixes check-memprof under NPM.
Reviewed By: leonardchan
Differential Revision: https://reviews.llvm.org/D91389
Stanislav Mekhanoshin [Fri, 13 Nov 2020 22:33:43 +0000 (14:33 -0800)]
[AMDGPU] Mark sin/cos load folding as modifying the function.
When the load value is folded into the sin/cos operation, the
AMDGPU library calls simplifier could still mark the function
as unmodified. Instead ensure if there is an early return,
return whether the load was folded into the sin/cos call.
Authored by MJDSys
Differential Revision: https://reviews.llvm.org/D91401
Duncan P. N. Exon Smith [Sun, 8 Nov 2020 01:44:09 +0000 (20:44 -0500)]
Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC
Drop `IncludeBriefCommentsInCodeCompletion` since it is always `false`.
Differential Revision: https://reviews.llvm.org/D91295
Sam Clegg [Fri, 13 Nov 2020 05:43:57 +0000 (21:43 -0800)]
[WebAssembly] Move GlobalTLSAddress handling to WebAssemblyISelLowering. NFC
I'm not why it was added to DAGToDAG oringally but it seems
to make sense alongside the non-TLS version: LowerGlobalAddress
Differential Revision: https://reviews.llvm.org/D91432
Vladimir Vereschaka [Fri, 13 Nov 2020 22:21:27 +0000 (14:21 -0800)]
[CMake] Explicity set up RPATH for the runtime libs on Win to ARM Linux cross builds.
Since RPATH initialization was disabled for the runtime libraries to
avoid overwriting RPATH unconditionally we need to explicity set up it
for the Win to Arm Linux cross builds.
See some details here: https://reviews.llvm.org/D91099
Lang Hames [Fri, 13 Nov 2020 21:26:06 +0000 (08:26 +1100)]
[ORC] Fix missing return value.
Sanjay Patel [Fri, 13 Nov 2020 21:05:07 +0000 (16:05 -0500)]
[LoopUnroll] add test for full unroll that is sensitive to cost-model; NFC
See discussion in D90554.
Akira Hatanaka [Fri, 13 Nov 2020 18:40:40 +0000 (10:40 -0800)]
[ObjC][ARC] Add and use a function which finds and returns the single
dependency. NFC
Use findSingleDependency in place of FindDependencies and stop passing a
set of Instructions around. Modify FindDependencies to return a boolean
flag which indicates whether the dependencies it has found are all
valid.
Akira Hatanaka [Fri, 13 Nov 2020 17:56:12 +0000 (09:56 -0800)]
Move variable declarations to functions in which they are used. NFC
Jessica Paquette [Fri, 13 Nov 2020 19:28:55 +0000 (11:28 -0800)]
[GlobalISel] Add convenience matchers for nots and all-ones constants
Add a convenience matcher which handles
```
G_XOR %not_reg, -1
```
And a convenience matcher which returns true if an integer constant is
all-ones.
Differential Revision: https://reviews.llvm.org/D91459
Arthur Eubanks [Thu, 12 Nov 2020 21:19:04 +0000 (13:19 -0800)]
[DFSan][NewPM] Handle dfsan under NPM
Make it required. Since it's a module pass, optnone won't test it, so
extend the clang test to also use opt-bisect now that it's supported.
14/16 check-dfsan tests failed with NPM enabled, now all pass.
Reviewed By: leonardchan
Differential Revision: https://reviews.llvm.org/D91385
Nikita Popov [Fri, 13 Nov 2020 21:17:26 +0000 (22:17 +0100)]
[KnownBits] Combine abs() implementations
ValueTracking was using a more powerful abs() implementation. Roll
it into KnownBits::abs(). Also add an exhaustive test for abs(),
in both the poisoning and non-poisoning variants.
Duncan P. N. Exon Smith [Thu, 12 Nov 2020 17:53:49 +0000 (12:53 -0500)]
Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC
Clean up the logic for `err_fe_{pch,module,ast}_file_modified` to use a
`select` like other ASTReader diagnostics. There should be no
functionality change here, just a cleanup.
Differential Revision: https://reviews.llvm.org/D91367
Rahul Joshi [Fri, 13 Nov 2020 19:58:40 +0000 (11:58 -0800)]
[NFC] Refactor function declaration addition in AsyncToLLVM
- Extract repeated code into helper function/lambdas.
Differential Revision: https://reviews.llvm.org/D91453
Craig Topper [Fri, 13 Nov 2020 20:38:20 +0000 (12:38 -0800)]
[RISCV] Add test case showing failure to use GREVIW for i32 bitreverse if result is not sign extended. NFC
Thomas Raoux [Fri, 13 Nov 2020 20:16:47 +0000 (12:16 -0800)]
[mlir][vector] Support N-D vector in InsertMap/ExtractMap op
Support multi-dimension vector for InsertMap/ExtractMap op and update the
transformations. Currently the relation between IDs and dimension is implicitly
deduced from the types. We can then calculate an AffineMap based on it. In the
future the AffineMap could be part of the operation itself.
Differential Revision: https://reviews.llvm.org/D90995
Nawrin Sultana [Fri, 6 Nov 2020 20:45:25 +0000 (14:45 -0600)]
[OpenMP] Add omp_calloc implementation
This patch adds omp_calloc implementation according to OpenMP 5.1
specification.
Differential Revision: https://reviews.llvm.org/D90967
MaheshRavishankar [Fri, 13 Nov 2020 20:21:43 +0000 (12:21 -0800)]
[mlir][Linalg] Change LinalgDependenceGraph to use LinalgOp.
Using LinalgOp will reduce the repeated conversion from Operation <->
LinalgOp.
Differential Revision: https://reviews.llvm.org/D91101
Matt Arsenault [Fri, 25 Sep 2020 15:57:13 +0000 (11:57 -0400)]
emacs: Add callbr to keyword list
Matt Arsenault [Fri, 25 Sep 2020 16:59:28 +0000 (12:59 -0400)]
GlobalISel: Fix typos
Heejin Ahn [Fri, 13 Nov 2020 12:24:47 +0000 (04:24 -0800)]
[WebAssembly] Rename atomic.notify and *.atomic.wait
- atomic.notify -> memory.atomic.notify
- i32.atomic.wait -> memory.atomic.wait32
- i64.atomic.wait -> memory.atomic.wait64
See https://github.com/WebAssembly/threads/pull/149.
Reviewed By: tlively
Differential Revision: https://reviews.llvm.org/D91447
Guozhi Wei [Fri, 13 Nov 2020 19:57:29 +0000 (11:57 -0800)]
[AlwaysInliner] Call mergeAttributesForInlining after inlining
Like inlineCallIfPossible and InlinerPass, after inlining mergeAttributesForInlining
should be called to merge callee's attributes to caller. But it is not called in
AlwaysInliner, causes caller's attributes inconsistent with inlined code.
Attached test case demonstrates that attribute "min-legal-vector-width"="512" is
not merged into caller without this patch, and it causes failure in SelectionDAG
when lowering the inlined AVX512 intrinsic.
Differential Revision: https://reviews.llvm.org/D91446
Craig Topper [Fri, 13 Nov 2020 19:45:05 +0000 (11:45 -0800)]
[RISCV] Add test case for failure to use GREVIW for i32 bswap if result is not sign extended. NFC
Heejin Ahn [Fri, 13 Nov 2020 11:43:45 +0000 (03:43 -0800)]
[WebAssembly] Remove a temporarily added RUN line
This RUN line was added as a temporary measure to undo the damage done
by D79655. Everyone's build system should be fine by now.
Reviewed By: tlively
Differential Revision: https://reviews.llvm.org/D91448
Jianzhou Zhao [Fri, 13 Nov 2020 19:46:32 +0000 (19:46 +0000)]
Extend the dfsan store/load callback with write/read address
This helped debugging.
Reviewed-by: morehouse
Differential Revision: https://reviews.llvm.org/D91236
Jim Ingham [Fri, 13 Nov 2020 19:36:17 +0000 (11:36 -0800)]
The AssertRecognizer used the module from a frames SC without checking it was non-null.
I only have a crash report for this. I could reproduce it with a slightly older
lldb by running an expression that called pthread_kill, but we started making modules
for our expression JIT code, so that no longer triggers the bug. I can't think of another
good way to test it but the fix is obvious.
Duncan P. N. Exon Smith [Fri, 13 Nov 2020 17:00:08 +0000 (12:00 -0500)]
Serialization: Rename three AST diagnostics, NFC
All three diagnostics have a select between "PCH", "module", and "AST"
in the text. The most generic of these is "AST", so rename them from
`err_module_...` to `err_ast_...`.
Differential Revision: https://reviews.llvm.org/D91436
Craig Topper [Fri, 13 Nov 2020 18:26:11 +0000 (10:26 -0800)]
[RISCV] Add RORW/ROLW/RORIW/ROLIW test cases that don't sign extend the result. NFC
This shows that we currently fail to select RORIW/ROLIW.
Baptiste Saleil [Fri, 13 Nov 2020 18:32:57 +0000 (12:32 -0600)]
[PowerPC] Add paired vector load and store builtins and intrinsics
This patch adds the Clang builtins and LLVM intrinsics to load and store vector pairs.
Differential Revision: https://reviews.llvm.org/D90799
Aaron Ballman [Fri, 13 Nov 2020 18:27:28 +0000 (10:27 -0800)]
Pass the source range when diagnosing an unknown attribute
This way, the whole attribute gets highlighted with diagnostics instead
of just the scope name in an attribute like [[clang::unknown]].
Duncan P. N. Exon Smith [Thu, 12 Nov 2020 18:05:07 +0000 (13:05 -0500)]
Serialization: Hoist the check for in-flight diagnostics in ASTReader::getInputFile, NFC
This logic seems easier to follow without the `Error()` helper, and
checking `DiagnosticsEngine::isDiagnosticInFlight` just once up front.
Differential Revision: https://reviews.llvm.org/D91366
Jessica Paquette [Tue, 3 Nov 2020 22:59:29 +0000 (14:59 -0800)]
[AArch64][GlobalISel] Select G_SELECT cc, t, (G_SUB 0, x) -> CSNEG t, x, cc
When we see
```
%sub = G_SUB 0, %x
%select = G_SELECT %cc, %t, %sub
```
Fold away the G_SUB by producing
```
%select = CSNEG %t, %x, cc
```
Simple IR example: https://godbolt.org/z/K8TEnh
This is valid on both sides of the select, but for now, just handle one side.
It may make more sense to handle swapping sides during post-legalizer lowering.
Differential Revision: https://reviews.llvm.org/D90723
Nikita Popov [Fri, 13 Nov 2020 17:38:26 +0000 (18:38 +0100)]
[Local] Emit nsw for inbounds offset calculation
In line with D90708, we can use nsw for the inbounds offset
calculation -- the muls were already using nsw, but the adds were
not.
Jessica Paquette [Fri, 13 Nov 2020 17:28:37 +0000 (09:28 -0800)]
[AArch64][GlobalISel] NFC: Use CmpInst::isUnsigned instead of static helper
Reducing some code duplication.
We had a helper for checking if a predicate is unsigned. Remove that and use
the existing function in Instructions.cpp.
Differential Revision: https://reviews.llvm.org/D91288
Wouter van Oortmerssen [Thu, 12 Nov 2020 23:05:05 +0000 (15:05 -0800)]
[WebAssembly] Added R_WASM_FUNCTION_OFFSET_I64 for use with DWARF DW_AT_low_pc
Needed for wasm64, see discussion in https://reviews.llvm.org/D91203
Differential Revision: https://reviews.llvm.org/D91395
Simon Pilgrim [Fri, 13 Nov 2020 17:29:54 +0000 (17:29 +0000)]
[CostModel][X86] Remove unused CHECK prefixes
Allows us to remove the "CHECK: {{^}}" hack and help simplify D91275
Nikita Popov [Wed, 4 Nov 2020 21:13:40 +0000 (22:13 +0100)]
[Local] Clean up EmitGEPOffset
Handle the emission of the add in a single place, instead of three
different ones.
Don't emit an unnecessary add with zero to start with. It will get
dropped by InstCombine, but we may as well not create it in the
first place. This also means that InstCombine does not need to
specially handle this extra add.
This is conceptually NFC, but can affect worklist order etc.
Jonas Devlieghere [Fri, 13 Nov 2020 17:29:51 +0000 (09:29 -0800)]
[lldb] Fix SymbolFile/PDB/udt-layout.test
Update the test for
406ad187486b4277fc82a2c0714ae53396e47928
Yuanfang Chen [Fri, 13 Nov 2020 17:27:10 +0000 (09:27 -0800)]
[CGProfile] allows bitcast in metadata node storing function pointers
For example, during RAUW in IRMover, the `Function` ValueAsMetadata in "CG Profile" could become bitcast.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D88433
Jessica Paquette [Fri, 13 Nov 2020 00:42:32 +0000 (16:42 -0800)]
[GlobalISel] Add matchers for specific constants and a matcher for negations
It's fairly common to need matchers for a specific constant value, or for
common idioms like finding a negated register.
Add
- `m_SpecificICst`, which returns true when matching a specific value..
- `m_ZeroInt`, which returns true when an integer 0 is matched.
- `m_Neg`, which returns when a register is negated.
Also update a few places which use idioms related to the new matchers.
Differential Revision: https://reviews.llvm.org/D91397
Kadir Cetinkaya [Fri, 13 Nov 2020 17:19:52 +0000 (18:19 +0100)]
[clangd] Canonicalize LLVM_ENABLE_ZLIB
It is used in our lit test's configuration now.