Duncan P. N. Exon Smith [Wed, 4 Nov 2020 23:31:40 +0000 (18:31 -0500)]
Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC
`ASTUnit::Parse` sets up the `FileManager` earlier in the same function,
ensuring `ASTUnit::getFileManager()` matches `Clang->getFileManager()`.
Remove the later call to `setFileManager(getFileManager())` since it
does nothing.
Differential Revision: https://reviews.llvm.org/D90888
Craig Topper [Thu, 3 Dec 2020 23:58:59 +0000 (15:58 -0800)]
[RISCV] Rename FPCCToExtend->FPOpToExpand and FPOpToExtend->FPOpToExpand. NFC
These are used to call setOperationAction/setCondCodeAction with
the Expand action so it seems that Expand is a better name than
Extend.
Richard Smith [Thu, 3 Dec 2020 23:51:56 +0000 (15:51 -0800)]
P0857R0: Parse a requires-clause after an explicit
template-parameter-list in a lambda.
This implements one of the missing parts of P0857R0. Mark it as not done
on the cxx_status page given that it's still incomplete.
River Riddle [Thu, 3 Dec 2020 23:46:41 +0000 (15:46 -0800)]
[mlir][Parser] Don't hardcode the use of ModuleOp in the parser
This was important when ModuleOp was the only top level operation, but that isn't necessarily the case anymore. This is one of the last remaining aspects of the infrastructure that is hardcoded to ModuleOp.
Differential Revision: https://reviews.llvm.org/D92605
River Riddle [Thu, 3 Dec 2020 23:46:32 +0000 (15:46 -0800)]
[mlir][Pass] Remove the restriction that PassManager can only run on ModuleOp
This was a somewhat important restriction in the past when ModuleOp was distinctly the top-level container operation, as well as before the pass manager had support for running nested pass managers natively. With these two issues fading away, there isn't really a good reason to enforce that a ModuleOp is the thing running within a pass manager. As such, this revision removes the restriction and allows for users to pass in the name of the operation that the pass manager will be scheduled on.
The only remaining dependency on BuiltinOps from Pass after this revision is due to FunctionPass, which will be resolved in a followup revision.
Differential Revision: https://reviews.llvm.org/D92450
River Riddle [Thu, 3 Dec 2020 23:46:23 +0000 (15:46 -0800)]
[mlir][IR] Remove references to BuiltinOps from IR/
There isn't a good reason for anything within IR to specifically reference any of the builtin operations. The only place that had a good reason in the past was AsmPrinter, but the behavior there doesn't need to hardcode ModuleOp anymore.
Differential Revision: https://reviews.llvm.org/D92448
Thomas Raoux [Thu, 3 Dec 2020 04:45:26 +0000 (20:45 -0800)]
[mlir][linalg] Add vectorization for element-wise linalg ops
Add support for vectorization for linalg.generic representing element-wise ops.
Those are converted to transfer_read + vector ops + transfer_write.
Also re-organize the vectorization tests to be together.
Implementation derived from the work of @burmako, @agrue and
@fedelebron.
Differential Revision: https://reviews.llvm.org/D92540
Richard Smith [Thu, 3 Dec 2020 23:25:21 +0000 (15:25 -0800)]
PR45699: Fix crash if an unexpanded parameter pack appears in a
requires-clause.
Jonas Devlieghere [Thu, 3 Dec 2020 23:06:31 +0000 (15:06 -0800)]
[lldb] Use the cpu subtype enum values from llvm::MachO in ArchSpec (NFC)
Use the cpu subtype enum values from llvm::MachO in the ArchSpec MachO
table. As I'm already cluttering the history, restore the table's
formatting to its original glory.
Differential revision: https://reviews.llvm.org/D92601
Nico Weber [Thu, 3 Dec 2020 23:06:34 +0000 (18:06 -0500)]
try more to fix t.s on Windows after
7cb0a373d1
Philip Reames [Thu, 3 Dec 2020 22:58:30 +0000 (14:58 -0800)]
Use deref facts derived from minimum object size of allocations
This change should be fairly straight forward. If we've reached a call, check to see if we can tell the result is dereferenceable from information about the minimum object size returned by the call.
To control compile time impact, I'm only adding the call for base facts in the routine. getObjectSize can also do recursive reasoning, and we don't want that general capability here.
As a follow up patch (without separate review), I will plumb through the missing TLI parameter. That will have the effect of extending this to known libcalls - malloc, new, and the like - whereas currently this only covers calls with the explicit allocsize attribute.
Differential Revision: https://reviews.llvm.org/D90341
Aaron En Ye Shi [Wed, 25 Nov 2020 21:08:12 +0000 (21:08 +0000)]
[HIP] cmath demote long double args to double
Since there is no ROCm Device Library support for
long double, demote them to double, and use the fp64
math functions.
Differential Revision: https://reviews.llvm.org/D92130
Philip Reames [Thu, 3 Dec 2020 22:49:30 +0000 (14:49 -0800)]
[LoopVec] Support non-instructions as argument to uniform mem ops
The initial step of the uniform-after-vectorization (lane-0 demanded only) analysis was very awkwardly written. It would revisit use list of each pointer operand of a widened load/store. As a result, it was in the worst case O(N^2) where N was the number of instructions in a loop, and had restricted operand Value types to reduce the size of use lists.
This patch replaces the original algorithm with one which is at most O(2N) in the number of instructions in the loop. (The key observation is that each use of a potentially interesting pointer is visited at most twice, once on first scan, once in the use list of *it's* operand. Only instructions within the loop have their uses scanned.)
In the process, we remove a restriction which required the operand of the uniform mem op to itself be an instruction. This allows detection of uniform mem ops involving global addresses.
Differential Revision: https://reviews.llvm.org/D92056
Philip Reames [Thu, 3 Dec 2020 22:35:37 +0000 (14:35 -0800)]
[BasicAA] Move newline to dump from printer
Jonas Devlieghere [Thu, 3 Dec 2020 22:31:37 +0000 (14:31 -0800)]
[lldb] Refactor the Symbolicator initializer
We found out that we have clients relying on the old signature of the
Symbolicator initializer. Make the signature compatible again and
provide a factory method to initialize the class correctly based on
whether you have a target or want the symbolicator to create one for
you.
Differential revision: D92601
Fangrui Song [Thu, 3 Dec 2020 22:24:29 +0000 (14:24 -0800)]
Revert D90844 "[TableGen][SchedModels] Fix read/write variant substitution"
This reverts commit
112b3cb6ba49aacd821440d0913f15b32131480e.
D90844 made lib/Target/AArch64/AArch64GenSubtargetInfo.inc non-deterministic.
Justin Bogner [Thu, 3 Dec 2020 22:21:37 +0000 (14:21 -0800)]
Revert "[test] Add a triple to an x86 test"
This fails on some of the bots. Reverting to investigate.
This reverts commit
d5268ebe19252c86549a3c8a9c6b3fa714dbf17c.
Justin Bogner [Thu, 3 Dec 2020 22:05:51 +0000 (14:05 -0800)]
[test] Add a triple to an x86 test
This already "REQUIRE"d an x86 target, but it was also implicitly
depending on a default triple being set.
Siva Chandra Reddy [Thu, 3 Dec 2020 21:41:10 +0000 (13:41 -0800)]
[libc][NFC] Remove dependence on xmmintrin.h to read/write MXCSR.
The version of clang on the bots is unhappy with using xmmintrin.h.
So, this change removes dependence on xmmintrin by using inline
assembly.
Nico Weber [Thu, 3 Dec 2020 21:42:08 +0000 (16:42 -0500)]
try to fix t.s on Windows after
7cb0a373d1
Jonas Devlieghere [Thu, 3 Dec 2020 21:21:03 +0000 (13:21 -0800)]
[lldb] Recognize MachO cpu sub-type 2 as arm64
Make sure we recognize cpu sub-type 2 as arm64. In reality it's arm64e,
but we don't have the triple for that. Without this patch, we fall back
to unknown-apple-macosx- for the default architecture, which breaks
things like running expressions without a target.
Differential revision: https://reviews.llvm.org/D92603
David Blaikie [Thu, 3 Dec 2020 21:08:57 +0000 (13:08 -0800)]
[mlir] Use long rather than int to address pointer-to-int narrowing warning
David Blaikie [Thu, 3 Dec 2020 21:08:22 +0000 (13:08 -0800)]
[mlir] Make conversion functions inline instead of static to avoid -Wunused-function
Philip Reames [Thu, 3 Dec 2020 21:08:20 +0000 (13:08 -0800)]
[BasicAA] Minor formatting improvements for printers
Nico Weber [Wed, 2 Dec 2020 23:57:30 +0000 (18:57 -0500)]
[mac/lld] Implement -t
Goes well with `-why_load` to get an idea of load order.
Differential Revision: https://reviews.llvm.org/D92583
Siva Chandra Reddy [Tue, 1 Dec 2020 19:39:48 +0000 (11:39 -0800)]
[libc] Add simple x86_64 floating point exception and rounding mode support.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D92546
Philip Reames [Thu, 3 Dec 2020 20:43:26 +0000 (12:43 -0800)]
[BasicAA] Add print routines to DecomposedGEP for ease of debugging
Peter Steinfeld [Wed, 2 Dec 2020 20:31:56 +0000 (12:31 -0800)]
[flang] Fix bogus message on interface procedure argument names
We were keeping the state of parsed equivalence sets in the class
DeclarationVisitor. A problem happened when analyzing the the specification
part of a declaration that contained an EQUIVALENCE statement followed by an
interface block. The same DeclarationVisitor object that was created for the
outer declaration was being used to analyze the specification part
of a procedure body in the interface block. When analyzing the specification
part of the procedure in the interface block, the names in the outer
declaration's EQUIVALENCE statement were erroneously compared with the names in
the arguments of the interface procedure. This resulted in a bogus error
message.
I fixed this by not checking equivalence sets when we're in an interface
block. I also added a test that will produce an error message without
this change.
Differential Revision: https://reviews.llvm.org/D92501
Arthur O'Dwyer [Wed, 2 Dec 2020 23:55:01 +0000 (18:55 -0500)]
[libc++] Update and normalize the "all the headers" tests.
Some C++20 headers weren't added properly to all three of these
test files. Add them, and take the time to normalize the formatting
so that
diff <(grep '#include' foo.cpp) <(grep '#include' bar.cpp)
shows no diffs (except that `no_assert_include` deliberately
excludes `<cassert>`).
- Add macro guards to <{barrier,latch,semaphore}>.
- Add macro guards to <experimental/simd>.
- Remove an include of <cassert> from <semaphore>.
- Instead, include <cassert> in the semaphore tests.
Differential Revision: https://reviews.llvm.org/D92525
Mehdi Amini [Thu, 3 Dec 2020 19:59:20 +0000 (19:59 +0000)]
Revert "Include Region.h in OperationSupport.h instead of forward declaring it (NFC)"
This reverts commit
e312b388ebadcd074d559454aca1fd6e75e8e7a5.
The original breaking change has been reverted
Mehdi Amini [Thu, 3 Dec 2020 19:57:34 +0000 (19:57 +0000)]
Revert "Switch to std::is_trivially_move_constructible and std::is_trivially_copy_constructible"
This reverts commit
c8d406c93c5bb01599990201f78d8428dd29d289.
Builds are broken with some versions of GCC.
Scott Linder [Mon, 30 Nov 2020 16:59:09 +0000 (16:59 +0000)]
[AMDGPU] Extend and reorganize memory legalizer tests
* Rename some tests to try to make a convention (where all components
are optional) of:
<addrspace>_<syncscope>_<memory-orders>_<operation>
* Split up at a level of granularity appropriate for the different RUN
lines (i.e. split on addrspace so GFX6 can avoid FLAT) and that makes
running a specific test reasonable in terms of wall time taken. This
also means when run as part of the test suite the testing is not one
serial bottleneck.
* Auto-generate check lines with `update_llc_test_checks.py` to make
future maintenance more tractable.
Reviewed By: rampitec, t-tye
Differential Revision: https://reviews.llvm.org/D91545
Adam Czachorowski [Thu, 3 Dec 2020 17:09:36 +0000 (18:09 +0100)]
[clangd] AddUsing: Fix a crash on ElaboratedTypes without NestedNameSpecfiiers.
Differential Revision: https://reviews.llvm.org/D92579
Craig Topper [Thu, 3 Dec 2020 18:29:10 +0000 (10:29 -0800)]
[RISCV] Merge FMV_H_X_RV32/FMV_H_X_RV64 into a single opcode. Same with FMV_X_ANYEXTH_RV32/RV64
Rather than having a different opcode for RV32 and RV64. Let's just say the integer type is XLenVT and use a single opcode for both modes.
Differential Revision: https://reviews.llvm.org/D92538
serge-sans-paille [Thu, 26 Nov 2020 14:22:20 +0000 (15:22 +0100)]
Speedup some unicode rendering
Use a fast path for column width computation for ascii characters. Especially
relevant for llvm-objdump.
before:
% time ./bin/llvm-objdump -D -j .text /lib/libc.so.6 >/dev/null
./bin/llvm-objdump -D -j .text /lib/libc.so.6 > /dev/null 0.75s user 0.01s system 99% cpu 0.757 total
after:
% time ./bin/llvm-objdump -D -j .text /lib/libc.so.6 >/dev/null
./bin/llvm-objdump -D -j .text /lib/libc.so.6 > /dev/null 0.37s user 0.01s system 99% cpu 0.378 total
Differential Revision: https://reviews.llvm.org/D92180
Adhemerval Zanella [Thu, 3 Dec 2020 18:29:45 +0000 (15:29 -0300)]
[compiler-rt] [builtins] Use _Float16 on extendhfsf2, truncdfhf2 __truncsfhf2 if available
On AArch64 it allows use the native FP16 ABI (although libcalls are
not emitted for fptrunc/fpext lowering), while on other architectures
the expected current semantic is preserved (arm for instance).
For testing the _Float16 usage is enabled by architecture base,
currently only for arm, aarch64, and arm64.
This re-enabled revert done by https://reviews.llvm.org/rGb534beabeed3ba1777cd0ff9ce552d077e496726
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D92241
Sam Clegg [Wed, 2 Dec 2020 23:55:25 +0000 (15:55 -0800)]
[lld][WebAssembly] Fix malformed output with -pie + --shared-memory
The conditional guarding createInitMemoryFunction was incorrect and
didn't match that guarding the creation of the associated symbol.
Rather that reproduce the same conditions in multiple places we can
simply use the presence of the associated symbol.
Also, add an assertion that would have caught this bug.
Also, add a new test for this flag combination.
This is part of an ongoing effort to enable dynamic linking with
threads in emscripten.
See https://github.com/emscripten-core/emscripten/issues/3494
Differential Revision: https://reviews.llvm.org/D92520
Anna Thomas [Thu, 3 Dec 2020 19:02:47 +0000 (14:02 -0500)]
[ScalarizeMaskedMemIntrin] NFC: Pass args by reference
Fangrui Song [Thu, 3 Dec 2020 18:58:46 +0000 (10:58 -0800)]
[Metadata] Fix layer violation in D91576
There is a library layering issue. LLVMAnalysis provides llvm/Analysis/ScopedNoAliasAA.h and depends on LLVMCore.
LLVMCore provides llvm/IR/Metadata.cpp and it should not include a header file in LLVMAnalysis
Mehdi Amini [Thu, 3 Dec 2020 18:45:58 +0000 (18:45 +0000)]
Include Region.h in OperationSupport.h instead of forward declaring it (NFC)
This fixes the build on gcc5 toolchain where sizeof is required for
types used in SmallVector now.
This is a consequence of using std::is_trivially_copy_constructible
instead of the LLVM variant: https://reviews.llvm.org/D92543
LLVM GN Syncbot [Thu, 3 Dec 2020 18:47:31 +0000 (18:47 +0000)]
[gn build] Port
Mehdi Amini [Thu, 3 Dec 2020 17:45:28 +0000 (17:45 +0000)]
Use the generic form when printing from the python bindings and the verifier fails
This reduces the chances of segfault. While it is a good practice to ensure
robust custom printers, it is unfortunately common to have them crash on
invalid input.
Reviewed By: stellaraccident
Differential Revision: https://reviews.llvm.org/D92536
Nico Weber [Thu, 3 Dec 2020 18:43:12 +0000 (13:43 -0500)]
[gn build] (semi-manually) port
cc8df90b037
Nico Weber [Thu, 3 Dec 2020 18:42:52 +0000 (13:42 -0500)]
[gn build] (manually) port
65049d16100af
Stella Stamenova [Thu, 3 Dec 2020 18:25:52 +0000 (10:25 -0800)]
[compiler-rt] Fix a bug in the cmakelists file when CMAKE_CXX_FLAGS are empty
Right now, the regex expression will fail if the flags were not set. Instead, we should follow the pattern of other llvm projects and quote the expression, so that it can work even when the flags are not set.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D92586
Reid Kleckner [Wed, 2 Dec 2020 23:21:04 +0000 (15:21 -0800)]
Bump MSVC required version to 19.14
LLVM passes overaligned objects by value, which MSVC 19.1 didn't support on
x86_32. MSVC added this support somewhere between 19.1 and 19.14, but godbolt
doesn't have 19.11, 19.12, or 19.13 so I can't test before 19.14:
https://gcc.godbolt.org/z/75YoEz
Even if users are using the Visual Studio 2017 series of Visual C++ toolchains,
they should've already updated to 19.14 or newer at this point, or they
wouldn't be able to build LLVM. This just raises the CMake required minimum
version so the build fails earlier.
Differential Revision: https://reviews.llvm.org/D92515
Craig Topper [Thu, 3 Dec 2020 17:30:33 +0000 (09:30 -0800)]
[RISCV] Remove RISCVMergeBaseOffsetOpt from the -O0 pass pipeline.
Internally the pass skips any function with the optnone attribute. But that still requires checking each function. If the opt level is set to None we might as well just skip putting in the pipeline at all. This what is already done for many of the passes added by TargetPassConfig.
Differential Revision: https://reviews.llvm.org/D92511
Max Kudryavtsev [Thu, 3 Dec 2020 17:51:47 +0000 (09:51 -0800)]
[MLIR] Fix vector::TransferWriteOp builder losing permutation map
Supervectorizer pass uses this builder and loses the permutation map.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D92145
modimo [Thu, 3 Dec 2020 17:23:37 +0000 (09:23 -0800)]
[MemCpyOpt] Correctly merge alias scopes during call slot optimization
When MemCpyOpt performs call slot optimization it will concatenate the `alias.scope` metadata between the function call and the memcpy. However, scoped AA relies on the domains in metadata to be maintained in a caller-callee relationship. Naive concatenation breaks this assumption leading to bad AA results.
The fix is to take the intersection of domains then union the scopes within those domains.
The original bug came from a case of rust bad codegen which uses this bad aliasing to perform additional memcpy optimizations. As show in the added test case `%src` got forwarded past its lifetime leading to a dereference of garbage data.
Testing
ninja check-llvm
Reviewed By: jeroen.dobbelaere
Differential Revision: https://reviews.llvm.org/D91576
Fangrui Song [Thu, 3 Dec 2020 17:15:40 +0000 (09:15 -0800)]
Switch to std::is_trivially_move_constructible and std::is_trivially_copy_constructible
Differential Revision: https://reviews.llvm.org/D92543
Kazu Hirata [Thu, 3 Dec 2020 17:12:02 +0000 (09:12 -0800)]
[X86] Remove DecodeVPERMVMask and DecodeVPERMV3Mask
This patch removes the variants of DecodeVPERMVMask and
DecodeVPERMV3Mask that take "const Constant *C" as they are not used
anymore.
They were introduced on Sep 8, 2015 in commit
e88038f23517ffc741acfd307ff92e2b1af136d8.
The last use of DecodeVPERMVMask(const Constant *C, ...) was removed
on Feb 7, 2016 in commit
73fc26b44a8591b15f13eaffef17e67161c69388.
The last use of DecodeVPERMV3Mask(const Constant *C, ...) was removed
on May 28, 2018 in commit
dcfcfdb0d166fff8388bdd2edc5a2948054c9da1.
Differential Revision: https://reviews.llvm.org/D91926
Jameson Nash [Thu, 3 Dec 2020 15:37:18 +0000 (10:37 -0500)]
repair cygwin build
This is needed for cross-compiling LLVM from Cygwin, but it had gotten
deleted in rG2724d9e12960cc1d93eeabbfc9aa1bffffa041cc
Reviewed By: compnerd
Differential Revision: https://reviews.llvm.org/D92336
Anna Thomas [Thu, 3 Dec 2020 16:43:30 +0000 (11:43 -0500)]
[ScalarizeMaskedMemIntrin] NFC: Convert member functions to static
This will make it easier to add new PM support once the pass is moved
into transforms (D92407).
Valentin Clement [Thu, 3 Dec 2020 16:26:46 +0000 (11:26 -0500)]
[LLVMFrontend][openacc] Add basic unit tests for functions in LLVMFrontendOpenACC
Add unit tests for functions in LLVMFrontendOpenACC. As notice in D91470 these functions were not tested
as well as the ones for OpenMP (D91643). This patch add tests for the OpenACC part.
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D91653
Tue Ly [Fri, 18 Sep 2020 03:22:18 +0000 (23:22 -0400)]
[libc] Add implementation of hypot.
Refactor src/math/hypotf.cpp and test/src/math/hypotf_test.cpp and reuse them for hypot and hypot_test
Differential Revision: https://reviews.llvm.org/D91831
Nico Weber [Thu, 3 Dec 2020 15:54:52 +0000 (10:54 -0500)]
Try to fix tests on Windows after
0cbf61be8be
Ahmed Bougacha [Thu, 3 Sep 2020 15:43:21 +0000 (08:43 -0700)]
[Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth.
This also teaches MachO writers/readers about the MachO cpu subtype,
beyond the minimal subtype reader support present at the moment.
This also defines a preprocessor macro to allow users to distinguish
__arm64__ from __arm64e__.
arm64e defaults to an "apple-a12" CPU, which supports v8.3a, allowing
pointer-authentication codegen.
It also currently defaults to ios14 and macos11.
Differential Revision: https://reviews.llvm.org/D87095
Baptiste Saleil [Thu, 3 Dec 2020 15:49:38 +0000 (09:49 -0600)]
[PowerPC] Fix for excessive ACC copies due to PHI nodes
When using accumulators in loops, they are passed around in PHI nodes of unprimed
accumulators, causing the generation of additional prime/unprime instructions.
This patch detects these cases and changes these PHI nodes to primed accumulator
PHI nodes. We also add IR and MIR test cases for several PHI node cases.
Differential Revision: https://reviews.llvm.org/D91391
Nathan James [Thu, 3 Dec 2020 15:47:54 +0000 (15:47 +0000)]
[ASTMatchers][NFC] Made variadic operator funcs static
Fix naming style while were here too.
Yonghong Song [Fri, 3 Jan 2020 20:06:08 +0000 (12:06 -0800)]
[BPF] support atomic instructions
Implement fetch_<op>/fetch_and_<op>/exchange/compare-and-exchange
instructions for BPF. Specially, the following gcc intrinsics
are implemented.
__sync_fetch_and_add (32, 64)
__sync_fetch_and_sub (32, 64)
__sync_fetch_and_and (32, 64)
__sync_fetch_and_or (32, 64)
__sync_fetch_and_xor (32, 64)
__sync_lock_test_and_set (32, 64)
__sync_val_compare_and_swap (32, 64)
For __sync_fetch_and_sub, internally, it is implemented as
a negation followed by __sync_fetch_and_add.
For __sync_lock_test_and_set, despite its name, it actually
does an atomic exchange and return the old content.
https://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html
For intrinsics like __sync_{add,sub}_and_fetch and
__sync_bool_compare_and_swap, the compiler is able to generate
codes using __sync_fetch_and_{add,sub} and __sync_val_compare_and_swap.
Similar to xadd, atomic xadd, xor and xxor (atomic_<op>)
instructions are added for atomic operations which do not
have return values. LLVM will check the return value for
__sync_fetch_and_{add,and,or,xor}.
If the return value is used, instructions atomic_fetch_<op>
will be used. Otherwise, atomic_<op> instructions will be used.
All new instructions only support 64bit and 32bit with alu32 mode.
old xadd instruction still supports 32bit without alu32 mode.
For encoding, please take a look at test atomics_2.ll.
Differential Revision: https://reviews.llvm.org/D72184
Adam Czachorowski [Wed, 2 Dec 2020 17:55:32 +0000 (18:55 +0100)]
[clangd] Bundle code completion items when the include paths differ, but resolve to the same file.
This can happen when, for example, merging results from an external
index that generates IncludeHeaders with full URI rather than just
literal include.
Differential Revision: https://reviews.llvm.org/D92494
dfukalov [Wed, 2 Dec 2020 16:53:17 +0000 (19:53 +0300)]
[NFC] Reduce include files dependency.
1. Removed #include "...AliasAnalysis.h" in other headers and modules.
2. Cleaned up includes in AliasAnalysis.h.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D92489
Paul C. Anagnostopoulos [Tue, 24 Nov 2020 18:09:02 +0000 (13:09 -0500)]
[TableGen] Eliminate the 'code' type
Update the documentation.
Rework various backends that relied on the code type.
Differential Revision: https://reviews.llvm.org/D92269
Kazushi (Jam) Marukawa [Thu, 3 Dec 2020 03:22:59 +0000 (12:22 +0900)]
[VE] Add vsll, vsrl, vsla, vsra, and vsfa intrinsic instructions
Add vsll, vsrl, vsla, vsra, and vsfa intrinsic instructions and
regression tests.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D92550
Nico Weber [Thu, 3 Dec 2020 14:11:03 +0000 (09:11 -0500)]
[mac/arm] Fix rtti codegen tests when running on an arm mac
shouldRTTIBeUnique() returns false for iOS64CXXABI, which causes
RTTI objects to be emitted hidden. Update two tests that didn't
expect this to happen for the default triple.
Also rename iOS64CXXABI to AppleARM64CXXABI, since it's used for
arm64-apple-macos triples too.
Part of PR46644.
Differential Revision: https://reviews.llvm.org/D91904
Haruki Imai [Thu, 3 Dec 2020 13:52:00 +0000 (19:22 +0530)]
[MLIR] Normalize the results of normalizable operations
Memrefs with affine_map in the results of normalizable operation were
not normalized by `--normalize-memrefs` option. This patch normalizes
them.
Differential Revision: https://reviews.llvm.org/D88719
Nico Weber [Tue, 1 Dec 2020 01:10:30 +0000 (20:10 -0500)]
clang/darwin: Don't use response files with ld64
This morally reverts D82777 -- turns out that ld64 crashes with many
response files, so we must stop passing them to it until the crash is
fixed.
Differential Revision: https://reviews.llvm.org/D92357
Ilya Golovenko [Thu, 3 Dec 2020 13:55:11 +0000 (16:55 +0300)]
[clangd] Relation slabs should not be accounted when computing backing storage size
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D92484
Jay Foad [Wed, 2 Dec 2020 12:32:35 +0000 (12:32 +0000)]
[TableGen] Remove unused class RecordValResolver. NFC.
Differential Revision: https://reviews.llvm.org/D92477
Nico Weber [Wed, 2 Dec 2020 23:59:00 +0000 (18:59 -0500)]
Reland "[mac/lld] Implement -why_load".
The problem was that `sym` became replaced in the call
to make<ObjFile> and referring to it afer that read memory that now
stored a different kind of symbol (a Defined instead of a LazySymbol).
Since this happens only once per archive, just copy the symbol to the
stack before make<ObjFile> and read the copy instead.
Originally reviewed at https://reviews.llvm.org/D92496
Martin Storsjö [Thu, 3 Dec 2020 08:31:31 +0000 (10:31 +0200)]
[compiler-rt] Fix building the aarch64 out-of-line atomics assembly for non-ELF platforms
Move the two different definitions of FUNC_ALIGN out of the ELF
specific block. Add the missing CFI_END in
END_COMPILERRT_OUTLINE_FUNCTION, to go with the corresponding CFI_START
in DEFINE_COMPILERRT_OUTLINE_FUNCTION_UNMANGLED.
Differential Revision: https://reviews.llvm.org/D92549
Kazushi (Jam) Marukawa [Mon, 30 Nov 2020 18:41:12 +0000 (03:41 +0900)]
[VE] Add standard include path and library path for C++
We have a plan to add libcxx and libcxxabi for VE. In order to do so,
we need to compile cxx source code with bootstarapped header files.
This patch adds such expected path to make clang++ work, at least
not crash at the startup. Add regression test for that, also.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D92386
Joe Ellis [Wed, 2 Dec 2020 14:02:47 +0000 (14:02 +0000)]
[DAGCombine] Fix TypeSize warning in DAGCombine::visitLIFETIME_END
Bail out early if we encounter a scalable store.
Reviewed By: peterwaller-arm
Differential Revision: https://reviews.llvm.org/D92392
Evgeniy Brevnov [Thu, 3 Dec 2020 12:02:32 +0000 (19:02 +0700)]
[NFC][Tests] Added one additional test case for NaryRessociation pass.
New tes cases added. Change var names to avoid the following warning from update_test_checks.py:
WARNING: Change IR value name 'tmp5' to prevent possible conflict with scripted FileCheck name.
Reviewed By: ebrevnov
Differential Revision: https://reviews.llvm.org/D92566
Haojian Wu [Thu, 3 Dec 2020 11:57:41 +0000 (12:57 +0100)]
[clangd] Fix a nullptr-access crash in canonicalRenameDecl.
Evgeniy Brevnov [Thu, 3 Dec 2020 10:51:40 +0000 (17:51 +0700)]
[NFC][Tests] Auto generate checks for llvm/test/Transforms/NaryReassociate/pr24301.ll using update_test_checks.py
Generate checks with update_test_checks.py in order to simplify upcoming updates.
Reviewed By: mkazantsev
Differential Revision: https://reviews.llvm.org/D92561
Georgii Rymar [Thu, 3 Dec 2020 09:16:58 +0000 (12:16 +0300)]
[llvm-readelf/obj] - Report unique warnings in getSymbolForReloc() helper.
Use `reportUniqueWarning` instead of `reportWarning` and refine the
interface of the helper.
Differential revision: https://reviews.llvm.org/D92556
Tim Northover [Tue, 10 Nov 2020 11:15:08 +0000 (11:15 +0000)]
arm64: count Triple::aarch64_32 as an aarch64 target and enable leaf frame pointers
Jon Chesterfield [Thu, 3 Dec 2020 10:36:20 +0000 (10:36 +0000)]
[libomptarget][amdgpu] Address compiler warnings, drive by fixes
[libomptarget][amdgpu] Address compiler warnings, drive by fixes
Initialize some variables, remove unused ones.
Changes the debug printing condition to align with the aomp test suite.
Differential Revision: https://reviews.llvm.org/D92559
Georgii Rymar [Thu, 3 Dec 2020 08:42:17 +0000 (11:42 +0300)]
[llvm-readelf] - Report unique warnings when dumping hash symbols/histogram.
This converts 2 more places to use `reportUniqueWarning` and adds tests.
Differential revision: https://reviews.llvm.org/D92551
Max Kazantsev [Thu, 3 Dec 2020 10:08:35 +0000 (17:08 +0700)]
Revert "[IndVars] ICmpInst should not prevent IV widening"
This reverts commit
0c9c6ddf17bb01ae350a899b3395bb078aa0c62e.
We are seeing some failures with this patch locally. Not clear
if it's causing them or just triggering a problem in another
place. Reverting while investigating.
Julian Gross [Mon, 23 Nov 2020 15:03:27 +0000 (16:03 +0100)]
[MLIR] Added support for dynamic shaped allocas to promote-buffers-to-stack pass.
Extended promote buffers to stack pass to support dynamically shaped allocas.
The conversion is limited by the rank of the underlying tensor.
An option is added to the pass to adjust the given rank.
Differential Revision: https://reviews.llvm.org/D91969
Gabor Marton [Wed, 25 Nov 2020 15:29:28 +0000 (16:29 +0100)]
[Clang][Sema] Attempt to fix CTAD faulty copy of non-local typedefs
http://lists.llvm.org/pipermail/cfe-dev/2020-November/067252.html
Differential Revision: https://reviews.llvm.org/D92101
Sven van Haastregt [Thu, 3 Dec 2020 10:21:29 +0000 (10:21 +0000)]
[OpenCL] Add some more kernel argument tests
Differential Revision: https://reviews.llvm.org/D92406
Marek Kurdej [Thu, 3 Dec 2020 09:38:37 +0000 (10:38 +0100)]
[clang-format] De-duplicate includes with leading or trailing whitespace.
This fixes PR46555 (https://bugs.llvm.org/show_bug.cgi?id=46555).
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D88296
Marek Kurdej [Thu, 3 Dec 2020 09:27:09 +0000 (10:27 +0100)]
[c++2b] Add option -std=c++2b to enable support for potential C++2b features.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D92547
Christian Sigg [Thu, 3 Dec 2020 09:08:08 +0000 (10:08 +0100)]
Fix forward for rGd9adde5ae216: adding missing dependency.
Reviewed By: herhut
Differential Revision: https://reviews.llvm.org/D92552
Kazushi (Jam) Marukawa [Thu, 3 Dec 2020 01:18:10 +0000 (10:18 +0900)]
[VE] Add veqv and vseq intrinsic instructions
Add veqv and vseq intrinsic instructions and regression tests.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D92527
Marek Kurdej [Thu, 3 Dec 2020 08:17:14 +0000 (09:17 +0100)]
[libc++] [docs] Add C++2b (to be C++23) status page.
Also:
* Fix header line in all status tables.
* Use C++20 instead of C++2a.
Reviewed By: ldionne, #libc, miscco
Differential Revision: https://reviews.llvm.org/D92306
Christian Sigg [Wed, 2 Dec 2020 08:48:59 +0000 (09:48 +0100)]
[mlir][gpu] Move gpu.wait ops from async.execute regions to its dependencies.
This can prevent unnecessary host synchronization.
Reviewed By: herhut
Differential Revision: https://reviews.llvm.org/D90346
Yuanfang Chen [Thu, 3 Dec 2020 07:31:06 +0000 (23:31 -0800)]
[NFC] Add proper triple for arc.ll test
Yonghong Song [Wed, 2 Dec 2020 03:26:39 +0000 (19:26 -0800)]
BPF: add a test for selectiondag alias analysis w.r.t. lifetime
This adds a test for the bug
https://bugs.llvm.org/show_bug.cgi?id=47591
Previously, selection dag has a bug which may incorrectly
assume no alias when crossing a lifetime boundary and this
may generate incorrect code as demonstrated in the above bug.
It looks the bug is fixed by https://reviews.llvm.org/D91833.
Basically, when comparing two potential memory access dag nodes,
a store and a lifetime.start,
with the same frame index.
Previously, it may be decided no alias. With the above fix,
these two will be considered aliasing which will prevent
incorrect code scheduling.
Differential Revision: https://reviews.llvm.org/D92451
modimo [Thu, 3 Dec 2020 06:23:57 +0000 (22:23 -0800)]
[NFC] Fix typo
Fangrui Song [Thu, 3 Dec 2020 06:02:48 +0000 (22:02 -0800)]
Switch from llvm::is_trivially_copyable to std::is_trivially_copyable
GCC<5 did not support std::is_trivially_copyable. Now LLVM builds require 5.1
we can migrate to std::is_trivially_copyable.
The Optional.h change made MSVC choke
(https://buildkite.com/llvm-project/premerge-checks/builds/18587#
cd1bb616-ffdc-4581-9795-
b42c284196de)
so I leave it out for now.
Differential Revision: https://reviews.llvm.org/D92514
Jianzhou Zhao [Wed, 2 Dec 2020 05:58:09 +0000 (05:58 +0000)]
[dfsan] Rename ShadowTy/ZeroShadow with prefix Primitive
This is a child diff of D92261.
After supporting field/index-level shadow, the existing shadow with type
i16 works for only primitive types.
Reviewed-by: morehouse
Differential Revision: https://reviews.llvm.org/D92459
Pushpinder Singh [Wed, 2 Dec 2020 06:34:38 +0000 (01:34 -0500)]
[libomptarget][AMDGPU] Remove MaxParallelLevel
Removes MaxParallelLevel references from rtl.cpp and drops
resulting dead code.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D92463
Craig Topper [Thu, 3 Dec 2020 05:03:05 +0000 (21:03 -0800)]
[RISCV] Add additional half precision fnmadd/fnmsub tests with an fneg on the second operand instead of the first.
This matches the float/double tests added in
defe11866a326491ee9767f84bb3f70cfc4f4bcb
Craig Topper [Thu, 3 Dec 2020 04:20:38 +0000 (20:20 -0800)]
[RISCV] Add f16 to isFMAFasterThanFMulAndFAdd now that the Zfh extension is supported
QingShan Zhang [Thu, 3 Dec 2020 03:09:25 +0000 (03:09 +0000)]
[PowerPC] Add the hw sqrt test for vector type v4f32/v2f64
PowerPC ISA support the input test for vector type v4f32 and v2f64.
Replace the software compare with hw test will improve the perf.
Reviewed By: ChenZheng
Differential Revision: https://reviews.llvm.org/D90914
Kazu Hirata [Thu, 3 Dec 2020 03:09:45 +0000 (19:09 -0800)]
[SelectionDAG] Use is_contained (NFC)