Marek Kurdej [Wed, 24 Mar 2021 13:26:02 +0000 (14:26 +0100)]
[clang] [C++2b] [P1102] Accept lambdas without parameter list ().
As an extension, accept such lambdas in previous standards with a warning.
* http://eel.is/c++draft/expr.prim.lambda
* http://wg21.link/P1102
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D98433
Stefan Pintilie [Tue, 23 Mar 2021 15:31:52 +0000 (10:31 -0500)]
[PowerPC] Add mprivileged option
Add an option to tell the compiler that it can use privileged instructions.
This patch only adds the option. Backend implementation will be added in a
future patch.
Reviewed By: lei, amyk
Differential Revision: https://reviews.llvm.org/D99193
Vinicius Tinti [Sat, 1 Aug 2020 01:45:05 +0000 (22:45 -0300)]
[llvm-objdump] Implement --prefix-strip option
The option `--prefix-strip` is only used when `--prefix` is not empty.
It removes N initial directories from absolute paths before adding the
prefix.
This matches GNU's objdump behavior.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D96679
Haojian Wu [Tue, 23 Mar 2021 10:16:57 +0000 (11:16 +0100)]
[clang] Treat variable-length array of incomplete element type as
incomplete type.
Differential Revision: https://reviews.llvm.org/D99165
Joseph Huber [Mon, 15 Mar 2021 15:52:38 +0000 (11:52 -0400)]
[OpenMP] Change OMPIRBuilder to append function attributes
Summary:
Currently the OMPIRBuilder overwrites the function's existing attributes
when it assigns the ones defined in OMPKinds.def. This changes the
behaviour to append the current function's attributes with them instead.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D98740
Anastasia Stulova [Wed, 3 Mar 2021 19:00:55 +0000 (19:00 +0000)]
[OpenCL] Added distinct file extension for C++ for OpenCL.
Files compiled with C++ for OpenCL mode can now have a distinct
file extension - clcpp, then clang driver picks the compilation
mode automatically (-x clcpp) without the use of -cl-std=clc++.
Differential Revision: https://reviews.llvm.org/D96771
Alexey Bataev [Wed, 24 Mar 2021 12:35:36 +0000 (05:35 -0700)]
[LoopAnalysis][NFC]Remove redundant code.
Removed redundant code for IsConsecutive variable.
Nico Weber [Wed, 24 Mar 2021 12:29:34 +0000 (08:29 -0400)]
[gn build] port
1d8fc086ae26
Nicolas Vasilache [Wed, 24 Mar 2021 11:24:22 +0000 (11:24 +0000)]
[mlir] Fixes to hoist padding
Fix the BlockAndValueMapping update that was missing entries for scf.for op's blockIterArgs.
Skip cloning subtensors of the padded tensor as the logic for these is separate.
Add a filter to drop side-effecting ops.
Tests are beefed up to verify the IR is sound in all hoisting configurations for 2-level 3-D tiled matmul.
Differential Revision: https://reviews.llvm.org/D99255
Simon Pilgrim [Wed, 24 Mar 2021 11:31:35 +0000 (11:31 +0000)]
[X86][AVX] lowerShuffleAsBroadcast - MOVDDUP(SCALAR_TO_VECTOR(X)) -> BROADCAST(X)
Prefer broadcast from scalar on AVX targets as this makes it easier for later folds to strip away bitcasts etc.
This helps a lot with the AVX1 poor codegen from PR49658.
There's a trivial regression in bitcast-int-to-vector-bool-*ext.ll tests due to SimplifyDemandedBits not being able to see a multi-use case, but there's bigger existing codegen issues to be addressed first in those tests (unnecessary NOTs).
Andrea Di Biagio [Wed, 24 Mar 2021 11:20:15 +0000 (11:20 +0000)]
[MCA] Fix for uninitialised member in constructor. NFC
Simon Pilgrim [Wed, 24 Mar 2021 11:11:57 +0000 (11:11 +0000)]
[X86] Remove unused 'OneUse' option from IsNOT helper. NFCI.
Simon Pilgrim [Wed, 24 Mar 2021 10:57:50 +0000 (10:57 +0000)]
[X86][AVX] Cleanup gather_v8i32_v8i32 special test case
Cleanup the gather_v8i32_v8i32 IR to more closely match how the middle-end will optimise the vector geps (exposing more splats).
This helps the gather scalarization case a lot, but shows a missed opportunity for AVX512 gathers to recognise uniform-constant indices.
And none of the cases realise that some of the gathers are really blended broadcasts....
alex-t [Thu, 18 Mar 2021 19:22:08 +0000 (22:22 +0300)]
[AMDGPU] SIOptimizeExecMaskingPreRA should check constant bus constraint when folds EXEC copy
Folding EXEC copy into it's single use may lead to constant bus constraint violation as it adds one more SGPR operand.
This change makes it validate the user instruction with the new SGPR operand and only fold it if it is legal.
Reviewed By: rampitec, arsenm
Differential Revision: https://reviews.llvm.org/D98888
David Zarzycki [Wed, 24 Mar 2021 11:06:07 +0000 (07:06 -0400)]
Revert "[lldb/Plugins] Add ScriptedProcess Process Plugin"
This reverts commit
dd391e1ef762d79f86112dc2480a89c9be066ce1.
This patch causes 17 LLDB test regressions on Fedora 33 (x86-64).
Florian Hahn [Wed, 24 Mar 2021 10:01:20 +0000 (10:01 +0000)]
[LV] Move exact FP math check out of Requirements.
We know if the loop contains FP instructions preventing vectorization
after we are done with legality checks. This patch updates the code the
check for un-vectorizable FP operations earlier, to avoid unnecessarily
running the cost model and picking a vectorization factor. It also makes
the code more direct and moves the check to a position where similar
checks are done.
I might be missing something, but I don't see any reason to handle this
check differently to other, similar checks.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D98633
Jan Svoboda [Wed, 24 Mar 2021 10:58:19 +0000 (11:58 +0100)]
[clang][deps] NFC: Document collector, rename members
This patch documents how `ModuleDepCollector{,PP}` work and what their members store. Also renames somewhat vague `MainDeps` to `FileDeps` and `Deps` to `ModularDeps`.
Depends on D98943.
Reviewed By: Bigcheese
Differential Revision: https://reviews.llvm.org/D98950
Jan Svoboda [Wed, 24 Mar 2021 10:56:26 +0000 (11:56 +0100)]
[clang][deps] NFC: Extract ModuleID struct
This patch extracts the `ModuleName` and `ContextHash` members of `ClangModuleDep`, `FullDependencies` and `ModuleDeps` into a single struct `ModuleID`. This makes it easier to understand how the full dependency graph works.
Reviewed By: Bigcheese, dexonsmith
Differential Revision: https://reviews.llvm.org/D98943
Andrew Savonichev [Sun, 14 Mar 2021 22:25:51 +0000 (01:25 +0300)]
[MCA] Disable RCU for InOrderIssueStage
This is a follow-up for:
D98604 [MCA] Ensure that writes occur in-order
When instructions are aligned by the order of writes, they retire
in-order naturally. There is no need for an RCU, so it is disabled.
Differential Revision: https://reviews.llvm.org/D98628
Stefan Pintilie [Tue, 23 Mar 2021 13:20:08 +0000 (08:20 -0500)]
[PowerPC] Change option to mrop-protect
In order to have the same option on power PC LLVM and power PC gcc
the option will be changed from -mrop-protection to -mrop-protect.
The feature will be off by default and turned on when the option is used.
Reviewed By: lei, amyk
Differential Revision: https://reviews.llvm.org/D99185
Gabor Marton [Wed, 24 Mar 2021 10:46:10 +0000 (11:46 +0100)]
[Analyzer][NFC] Fix typos in comments
Ella Ma [Wed, 24 Mar 2021 10:32:57 +0000 (11:32 +0100)]
[clang][lit] Allow test cases to use the compiler that are used to compile Clang
Required by D83660.
Test cases may want to use the host compiler to compile some mocks for the
test case.
This patch adds two substitutions `%host_cc` and `%host_cxx` to use the host
compilers set via variable `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER`.
Patch by Ella Ma!
Reviewed By: steakhal
Differential Revision: https://reviews.llvm.org/D98918
Roman Lebedev [Wed, 24 Mar 2021 09:47:51 +0000 (12:47 +0300)]
[NFC][PhaseOrdering] Add a testcase for additional LICM before LoopRotate (D99249/D99204)
Vladislav Vinogradov [Tue, 23 Mar 2021 08:45:24 +0000 (11:45 +0300)]
[mlir][NFC] Replace `getMemorySpaceAsInt` with `getMemorySpace` where possible
Use new `MemRefType::getMemorySpace` method with generic Attribute
in cases, where there is no specific logic around the memory space.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D99154
Ta-Wei Tu [Wed, 24 Mar 2021 10:21:13 +0000 (18:21 +0800)]
[NFC] Improve debug message and test description in 4c1f74a
Ta-Wei Tu [Wed, 24 Mar 2021 10:07:34 +0000 (18:07 +0800)]
[LoopFlatten] Fix invalid assertion (PR49571)
The `InductionPHI` is not necessarily the increment instruction, as
demonstrated in pr49571.ll.
This patch removes the assertion and instead bails out from the
`LoopFlatten` pass if that happens.
This fixes https://bugs.llvm.org/show_bug.cgi?id=49571
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D99252
Ta-Wei Tu [Wed, 24 Mar 2021 09:58:12 +0000 (17:58 +0800)]
[NFC] Remove redundant `struct` prefix
Reviewed By: SjoerdMeijer, fhahn
Differential Revision: https://reviews.llvm.org/D99251
Martin Storsjö [Tue, 23 Mar 2021 16:42:32 +0000 (18:42 +0200)]
[libcxx] [test] Add return values after assert(false) in some experimental tests
When building in MSVC mode (in release mode), the assert(false) don't
make the end of the function unreachable, so add return statements to
silence compiler warnings (treated as errors).
Also change 'virtual' into 'override', which was requested in review,
as these files require C++11.
Differential Revision: https://reviews.llvm.org/D99214
Raphael Isemann [Wed, 24 Mar 2021 09:35:58 +0000 (10:35 +0100)]
[lldb] Add llgs_test decorator back to TestAutoInstallMainExecutable
This got removed in
68bb51acd572735d80d20adb2c2fc51a5cbbd88e and this enabled
the test on macOS (where it just causes lldb-server to crash). Re-adding the
decorator to get the tests passing again.
Jason Molenda [Wed, 24 Mar 2021 09:18:17 +0000 (02:18 -0700)]
Handle a LC_NOTE main bin spec for user process corefiles
I was playing around with main bin spec LC_NOTEs and noticed
a small oversight in the parsing of user process corefile notes.
Nigel Perks [Fri, 12 Feb 2021 13:02:35 +0000 (13:02 +0000)]
[XCore][Test] XFAIL tests requiring 8-byte stack alignment.
XCore default subtarget does not support 8-byte stack alignment. These failures
can be seen on builder clang-xcore-ubuntu-20-x64 on staging buildbot.
Differential Revision: https://reviews.llvm.org/D99092
Yvan Roux [Wed, 24 Mar 2021 09:06:04 +0000 (10:06 +0100)]
[AArch64][ASAN] Re-enable fgets_fputs.cpp test.
Now that AArch64 mapping symbols are correctly handled by
llvm-symbolizer this test can be re-enabled on that target.
Andy Wingo [Tue, 23 Mar 2021 15:13:54 +0000 (16:13 +0100)]
[WebAssembly][MC] Record limit constraints for table sizes
This commit adds a full WasmTableType to MCSymbolWasm, differing from
the current situation (just an ElemType) in that it additionally records
a WasmLimits.
We add support for specifying the limits in .S files also, via the
following syntax variations:
.tabletype SYM, ELEMTYPE
.tabletype SYM, ELEMTYPE, MINSIZE
.tabletype SYM, ELEMTYPE, MINSIZE, MAXSIZE
Depends on D99186.
Differential Revision: https://reviews.llvm.org/D99191
Mehdi Amini [Wed, 24 Mar 2021 08:25:25 +0000 (08:25 +0000)]
Add a mechanism for Dialects to provide a fallback for OpInterface
This mechanism makes it possible for a dialect to not register all
operations but still answer interface-based queries.
This can useful for dialects that are "open" or connected to an external
system and still interoperate with the compiler. It can also open up the
possibility to have a more extensible compiler at runtime: the compiler
does not need a pre-registration for each operation and the dialect can
inject behavior dynamically.
Reviewed By: rriddle, jpienaar
Differential Revision: https://reviews.llvm.org/D93085
Balázs Kéri [Wed, 24 Mar 2021 07:42:29 +0000 (08:42 +0100)]
[clang][ASTImporter] Add import of DeducedTemplateSpecializationType.
Reviewed By: shafik
Differential Revision: https://reviews.llvm.org/D99188
Andy Wingo [Tue, 23 Mar 2021 13:46:32 +0000 (14:46 +0100)]
[WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC.
This patch renames the "Initial" member of WasmLimits to the name used
in the spec, "Minimum".
In the core WebAssembly specification, the Limits data type has one
required "min" member and one optional "max" member, indicating the
minimum required size of the corresponding table or memory, and the
maximum size, if any.
Although the WebAssembly spec does instantiate locally-defined tables
and memories with the initial size being equal to the minimum size, it
can't impose such a requirement for imports. It doesn't make sense to
require an initial size for a memory import, for example. The compiler
can only sensibly express the minimum and maximum sizes.
See
https://github.com/WebAssembly/js-types/blob/master/proposals/js-types/Overview.md#naming-of-size-limits
for a related discussion that agrees that the right name of "initial" is
"minimum" when querying the type of a table or memory from JavaScript.
(Of course it still makes sense for JS to speak in terms of an initial
size when it explicitly instantiates memories and tables.)
Differential Revision: https://reviews.llvm.org/D99186
Fangrui Song [Wed, 24 Mar 2021 06:37:43 +0000 (23:37 -0700)]
[Driver] Bring back i586-linxu-gnu
This is used by Fuchsia for a Debian jessie based sysroot.
Jason Molenda [Wed, 24 Mar 2021 06:34:22 +0000 (23:34 -0700)]
Update SafeMachO.h to #undefine more names
Depending on include order, these can cause build errors when
including the llvm MachO.h where these are defined as enums.
Update the list to include some more names.
Jim Lin [Wed, 24 Mar 2021 06:29:23 +0000 (14:29 +0800)]
[RISCV] Add HasStdExtD predicate to copysign from double and to double patterns
Copysign from double and to double patterns have lack of HasStdExtD predicate.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D99234
Alex Orlov [Wed, 24 Mar 2021 06:21:32 +0000 (10:21 +0400)]
* Fix demangling of optional template-args for vendor extended type qualifier.
This fixes https://bugs.llvm.org/show_bug.cgi?id=48009 bug.
Reviewed By: erik.pilkington, krisb
Differential Revision: https://reviews.llvm.org/D98687
Fangrui Song [Wed, 24 Mar 2021 06:12:18 +0000 (23:12 -0700)]
[Driver] Gnu.cpp: remove unneeded getMultiarchTriple normalization
Michael Kruse [Wed, 24 Mar 2021 05:54:37 +0000 (00:54 -0500)]
[Polly] Port DeadCodeElim to the NewPM.
Chuanqi Xu [Wed, 24 Mar 2021 05:58:54 +0000 (13:58 +0800)]
[NFC] [Support] Fix unconsistent comment with codes for ExtendSigned
Nemanja Ivanovic [Wed, 24 Mar 2021 05:25:03 +0000 (00:25 -0500)]
[PowerPC] Make altivec.h work with AIX which has no __int128
There are a number of functions in altivec.h that use
vector __int128 which isn't supported on AIX. Those functions
need to be guarded for targets that don't support the type.
Furthermore, the functions that produce quadword instructions
without using the type need a builtin. This patch adds the
macro guards to altivec.h using the __SIZEOF_INT128__ which
is only defined on targets that support the __int128 type.
Max Kazantsev [Wed, 24 Mar 2021 04:03:21 +0000 (11:03 +0700)]
[NFC] Fix comment describing what EdgeBundles is
The original comment says the same thing twice, and does not mention that
edges entering the block are also in the same bundle (which seems true from
what the underlying code is doing).
Differential Revision: https://reviews.llvm.org/D99144
Reviewed By: RKSimon
Serguei Katkov [Wed, 24 Mar 2021 03:19:52 +0000 (10:19 +0700)]
[RegAlloc] Fix "ran out of regs" with uses in statepoint
Statepoint instruction is known to have a variable and big number of operands.
It is possible that Register Allocator will split live intervals in the way that all
physical registers are occupied by "zero-length" live intervals which are marked
as not-spillable.
While intervals are marked as not-spillable in the moment of creation when they are
really zero-length it is possible that in future as part of re-materialization there will
need for physical register between def and use of such tiny interval (the use is not
related to this interval at all).
As all physical registers are assigned to not-spillable intervals there is not avaialbe
registers and RA reports an error.
The idea of the fix is avoid marking tiny live intervals where there is a use in statepoint
instruction in var args section. Such interval may be perfectly spilled and folded to
operand of statepoint.
Reviewers: reames, dantrushin, qcolombet, dsanders, dmgreen
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D98766
Craig Topper [Wed, 24 Mar 2021 02:34:39 +0000 (19:34 -0700)]
[X86] Bale out of X86FastISel::X86SelectCmp for vectors.
None of the code in this function was written to handle
vectors. Most of the cases already fail for vectors for one
reason or another. The exception is an optimization that
detects identical operands. This can be triggered by vectors,
but the code always creates a 0 or 1 constants in a scalar
register which is incorrect for vectors.
Fixes PR49706.
Zequan Wu [Wed, 24 Mar 2021 03:12:09 +0000 (20:12 -0700)]
Revert "[Driver] Bring back "Clean up Debian multiarch /usr/include/<triplet> madness" and restore i586-linux-gnu"
This breaks bots in chromium goma building.
This reverts commit
424bf5d8918f6356f1b8e99205c5fc8b4783ca22.
Zakk Chen [Thu, 18 Mar 2021 03:25:32 +0000 (20:25 -0700)]
[RISCV][Clang] Add RVV Vector Indexed Load intrinsic functions.
Support Complex type transformer to define more complexity legal type.
Overall our downstream implementation there are only four instructions need to
use complex type transformer, it's not a common case.
I still feel using a string for prototypes is simple and clear.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D98848
Vitaly Buka [Wed, 24 Mar 2021 02:11:11 +0000 (19:11 -0700)]
[NFC] Clang-format includes
Yang Fan [Wed, 24 Mar 2021 01:56:36 +0000 (09:56 +0800)]
[InstSimplify] Fix unused variable warning (NFC)
GCC warning:
```
/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp: In function ‘llvm::Value* SimplifyWithOpReplaced(llvm::Value*, llvm::Value*, llvm::Value*, const llvm::SimplifyQuery&, bool, unsigned int)’:
/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp:3993:15: warning: unused variable ‘SI’ [-Wunused-variable]
3993 | if (auto *SI = dyn_cast<SelectInst>(I))
| ^~
```
Hansang Bae [Thu, 11 Mar 2021 23:34:06 +0000 (17:34 -0600)]
[OpenMP] Misc. changes that add or remove pointer/bound checks
-- Added or moved checks to appropriate places.
-- Removed ineffective null check where the pointer is already being
dereferenced around the code.
-- Initialized variables that can be used without definitions.
-- Added call to dlclose/FreeLibrary in OMPT tool activation.
-- Added a new build compiler definition.
Differential Revision: https://reviews.llvm.org/D98584
Richard Smith [Tue, 23 Mar 2021 23:41:05 +0000 (16:41 -0700)]
Support #__private_macro and #__public_macro in local submodule
visibility mode.
Richard Smith [Tue, 23 Mar 2021 22:45:40 +0000 (15:45 -0700)]
Improve const-correctness. NFC.
Bruno Cardoso Lopes [Tue, 23 Mar 2021 23:13:29 +0000 (16:13 -0700)]
[CGAtomic] Lift stronger requirements on cmpxch and support acquire failure mode
- Fix `emitAtomicCmpXchgFailureSet` to support release/acquire (succ/fail) memory order.
- Remove stronger checks for cmpxch.
Effectively, this addresses http://wg21.link/p0418
Differential Revision: https://reviews.llvm.org/D98995
Choongwoo Han [Tue, 23 Mar 2021 22:59:45 +0000 (15:59 -0700)]
[Coverage] Load records immediately
The current implementation keeps buffers generated for each object file
until it completes loading of all files. This approach requires a lot of memory
if there are a lot of huge object files. Thus, make it to load coverage records
immediately rather than waiting for other binaries to be loaded.
This reduces memory usage of llvm-cov from >128GB to 5GB when
loading Chromium binaries in Windows.
Additional testing: check-profile, check-llvm
Differential Revision: https://reviews.llvm.org/D99110
Shoaib Meenai [Tue, 23 Mar 2021 23:16:02 +0000 (16:16 -0700)]
[lld] Fix test to work with and without a vendor string
Amara Emerson [Tue, 23 Mar 2021 23:11:45 +0000 (16:11 -0700)]
[AArch64][GlobalISel] Add test for G_FSHR legalization.
Amara Emerson [Tue, 23 Mar 2021 22:56:03 +0000 (15:56 -0700)]
[AArch64][GlobalISel] Lower G_FSHL and G_FSHR.
Codegen isn't as good as we need it, but that'll be done later.
Rob Suderman [Tue, 23 Mar 2021 01:22:30 +0000 (18:22 -0700)]
[mlir][tosa] Add tosa.argmax to linalg lowering
Tosa's argmax lowering is representable as a linalg.indexed_generic
operation. Include the lowering to this type for both integer and
floating point types.
Differential Revision: https://reviews.llvm.org/D99137
Jingu Kang [Mon, 22 Mar 2021 10:12:39 +0000 (10:12 +0000)]
[ValueTracking] Handle increasing mul recurrence in isKnownNonZero()
Differential Revision: https://reviews.llvm.org/D99069
Julian Lettner [Tue, 23 Mar 2021 22:09:13 +0000 (15:09 -0700)]
[Sanitizer] Remove refactoring leftover [NFC]
Rafael Auler [Wed, 3 Mar 2021 22:31:57 +0000 (14:31 -0800)]
Add register size info back to MCRegisterClass
This patch addresses the removal of register size information done in
commit c8b782c.
Without this change, there is no viable option to get register size
information outside libTarget. We need this information to run
analysis that know the register size from the MC layer, used by
BOLT.
Discussion D50285 and D47199.
Reviewed By: kparzysz
Differential Revision: https://reviews.llvm.org/D97891
Vy Nguyen [Tue, 23 Mar 2021 21:51:52 +0000 (17:51 -0400)]
[lld-macho] Fixed lld-version expectation in test so it works on Fuchsia.
On Fuchsia, it's called Fuchsia LLD
Differential Revision: https://reviews.llvm.org/D99217
Matteo Favaro [Tue, 23 Mar 2021 21:31:25 +0000 (21:31 +0000)]
[MSSA] Extending IsGuaranteedLoopInvariant to support an instruction defined in the entry block
As mentioned in [[ https://reviews.llvm.org/D96979 | D96979 ]], I'm extending the **IsGuaranteedLoopInvariant** check also to the `MemorySSA.cpp` file.
@fhahn For now I didn't unify the function into `MemorySSA.h` because, as you mentioned, it's not directly MSSA related. I'm open to suggestions to find a better place so we can improve the unification process.
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D97155
Shafik Yaghmour [Tue, 23 Mar 2021 21:31:40 +0000 (14:31 -0700)]
[NFC][LLDB] Removing extra semicolons to silence -Wc++98-compat-extra-semi diagnostics
Alexey Bataev [Tue, 23 Mar 2021 20:22:58 +0000 (13:22 -0700)]
[Analysis]Add getPointersDiff function to improve compile time.
Added getPointersDiff function to LoopAccessAnalysis and used it instead
direct calculatoin of the distance between pointers and/or
isConsecutiveAccess function in SLP vectorizer to improve compile time
and detection of stores consecutive chains.
Part of D57059
Differential Revision: https://reviews.llvm.org/D98967
Rob Suderman [Fri, 19 Mar 2021 23:04:50 +0000 (16:04 -0700)]
[mlir][tosa] Add tosa.pad to linalg.pad operation
Lowers from tosa's pad op to the linalg equivalent for floating,
integer, and quantized values.
Differential Revision: https://reviews.llvm.org/D98990
Vy Nguyen [Tue, 23 Mar 2021 21:14:27 +0000 (17:14 -0400)]
Revert "[lld-macho][nfc] minor clean up, follow up to D98559"
This reverts commit
1bc33eb6a32bdb193a8b838df823b4563450f6b3.
tests failed on windows
River Riddle [Tue, 23 Mar 2021 20:44:14 +0000 (13:44 -0700)]
[mlir][Pattern] Add better support for using interfaces/traits to match root operations in rewrite patterns
To match an interface or trait, users currently have to use the `MatchAny` tag. This tag can be quite problematic for compile time for things like the canonicalizer, as the `MatchAny` patterns may get applied to *every* operation. This revision adds better support by bucketing interface/trait patterns based on which registered operations have them registered. This means that moving forward we will only attempt to match these patterns to operations that have this interface registered. Two simplify defining patterns that match traits and interfaces, two new utility classes have been added: OpTraitRewritePattern and OpInterfaceRewritePattern.
Differential Revision: https://reviews.llvm.org/D98986
Chris Lattner [Tue, 23 Mar 2021 05:15:39 +0000 (22:15 -0700)]
[ODS] Implement a new 'hasCanonicalizeMethod' bit for cann patterns.
This provides a simplified way to implement 'matchAndRewrite' style
canonicalization patterns for ops that don't need the full power of
RewritePatterns. Using this style, you can implement a static method
with a signature like:
```
LogicalResult AssertOp::canonicalize(AssertOp op, PatternRewriter &rewriter) {
return success();
}
```
instead of dealing with defining RewritePattern subclasses. This also
adopts this for a few canonicalization patterns in the std dialect to
show how it works.
Differential Revision: https://reviews.llvm.org/D99143
Fangrui Song [Tue, 23 Mar 2021 20:32:30 +0000 (13:32 -0700)]
[test] Add --sysroot= to make gcc-toolchain.cpp stable
Matt Morehouse [Tue, 23 Mar 2021 18:57:12 +0000 (11:57 -0700)]
[HWASan] Refactor in preparation for x86 aliasing mode. NFC
Reviewed By: vitalybuka, eugenis
Differential Revision: https://reviews.llvm.org/D98373
Nikita Popov [Tue, 23 Mar 2021 20:18:30 +0000 (21:18 +0100)]
[BasicAA] Handle assumes with operand bundles
This fixes a regression reported on D99022: If a call has operand
bundles, then the inaccessiblememonly attribute on the function
will be ignored, as operand bundles can affect modref behavior in
the general case. However, for assume operand bundles in particular
this is not the case.
Adjust getModRefBehavior() to always report inaccessiblememonly
for assumes, regardless of presence of operand bundles.
Nikita Popov [Tue, 23 Mar 2021 20:07:36 +0000 (21:07 +0100)]
[BasicAA] Add test for assume with operand bundles (NFC)
Alexey Bataev [Tue, 23 Mar 2021 20:17:26 +0000 (13:17 -0700)]
Revert "[Analysis]Add getPointersDiff function to improve compile time."
This reverts commit
065a14a12d2694f26f4e894641f5ab8cfc5da8bd to
investigate and fix crash in SLP vectorizer.
Rob Suderman [Mon, 22 Mar 2021 21:38:39 +0000 (14:38 -0700)]
[mlir][tosa] Add tosa.tile to linalg.generic lowering
Tiling operations are generic operations with modified indexing. Updated to to
linalg lowerings to perform this lowering.
Differential Revision: https://reviews.llvm.org/D99113
Vy Nguyen [Tue, 23 Mar 2021 19:54:01 +0000 (15:54 -0400)]
[lld-macho][nfc] minor clean up, follow up to D98559
Differential Revision: https://reviews.llvm.org/D99210
natashaknk [Tue, 23 Mar 2021 20:00:38 +0000 (13:00 -0700)]
[mlir][tosa] Add tosa.matmul and tosa.fully_connected lowering
Adds lowerings for matmul and fully_connected. Only supports 2D tensors for inputs and weights, and 1D tensors for bias.
Reviewed By: rsuderman
Differential Revision: https://reviews.llvm.org/D99211
Alexey Bataev [Fri, 19 Mar 2021 14:19:17 +0000 (07:19 -0700)]
[Analysis]Add getPointersDiff function to improve compile time.
Added getPointersDiff function to LoopAccessAnalysis and used it instead
direct calculatoin of the distance between pointers and/or
isConsecutiveAccess function in SLP vectorizer to improve compile time
and detection of stores consecutive chains.
Part of D57059
Differential Revision: https://reviews.llvm.org/D98967
Amara Emerson [Tue, 23 Mar 2021 18:31:13 +0000 (11:31 -0700)]
[AArch64][GlobalISel] Lower G_CTLZ_ZERO_UNDEF.
This adds some missing legalizer tests, which uncovered a v2s64 selection
test that wasn't working since there's no legalization or instruction for that.
Craig Topper [Tue, 23 Mar 2021 19:20:04 +0000 (12:20 -0700)]
[ValueTracking] Teach canCreateUndefOrPoison that ctpop does not create undef or poison.
This select of ctpop with 0 pattern can get left behind after
loop idiom recognize converts a loop to ctpop. LLVM 10 was able
to optimize this, but LLVM 11 and later is not. The difference
seems to be that some select transforms are now limited based
on canCreateUndefOrPoison.
Teaching canCreateUndefOrPoison about ctpop restores the
LLVM 10 codegen.
Differential Revision: https://reviews.llvm.org/D99207
Petr Hosek [Wed, 10 Mar 2021 19:21:41 +0000 (11:21 -0800)]
[libcxxabi] Use cxx-headers target to consume libcxx headers
Rather than including libc++ include dir, use the cxx-headers target.
Differential Revision: https://reviews.llvm.org/D98367
Matt Morehouse [Tue, 23 Mar 2021 18:21:08 +0000 (11:21 -0700)]
[sanitizer] Implement MapDynamicShadowAndAliases.
The function works like MapDynamicShadow, except that it creates aliased
memory to the right of the shadow. The main use case is for HWASan
aliasing mode, which gets fast IsAlias() checks by exploiting the fact
that the upper bits of the shadow base and aliased memory match.
Reviewed By: vitalybuka, eugenis
Differential Revision: https://reviews.llvm.org/D98369
Vy Nguyen [Tue, 23 Mar 2021 02:05:46 +0000 (22:05 -0400)]
Revert "Revert "Revert "Revert "Revert "Revert "[lld-macho] Implement -dependency_info (partially - more opcodes needed)""""""
This reverts commit
4876ba5b2d6a1264ec73e5cf3fcad083f6927d19.
Third-attemp relanding D98559, new change:
- explicitly cast enum to underlying type to avoid ambiguity (workaround to clang's bug).
Louis Dionne [Tue, 23 Mar 2021 18:15:28 +0000 (14:15 -0400)]
[libc++] Remove old cache file that was left behind by accident
Peter Collingbourne [Mon, 22 Mar 2021 19:29:51 +0000 (12:29 -0700)]
scudo: Preserve no-memtag attribute on cached secondary allocations.
Differential Revision: https://reviews.llvm.org/D99103
Arthur O'Dwyer [Fri, 19 Mar 2021 17:55:28 +0000 (13:55 -0400)]
[C++20] [P1825] Fix bugs with implicit-move from variables of reference type.
Review D88220 turns out to have some pretty severe bugs, but I *think*
this patch fixes them.
Paper P1825 is supposed to enable implicit move from "non-volatile objects
and rvalue references to non-volatile object types." Instead, what was committed
seems to have enabled implicit move from "non-volatile things of all kinds,
except that if they're rvalue references then they must also refer to non-volatile
things." In other words, D88220 accidentally enabled implicit move from
lvalue object references (super yikes!) and also from non-object references
(such as references to functions).
These two cases are now fixed and regression-tested.
Differential Revision: https://reviews.llvm.org/D98971
Arthur O'Dwyer [Mon, 22 Mar 2021 21:38:28 +0000 (17:38 -0400)]
[libc++] Simpler Python script for generating a graph of libc++'s header dependencies
My attempts to play around with the old graph_header_deps.py were mostly fruitless;
I needed to modify it in various ways to make it work, and then even when I got it
working, it generated pretty ugly graphs.
Old graph_header_deps.py (after my local changes to simplify the usage)
(producing https://i.imgur.com/zATrsaP.jpg )
mkdir foo
time ./graph_header_deps.py --libcxx-only -o foo --clang-command ~/llvm-project/build/bin/clang++
dot -Tpng < foo/all_headers.dot > old.png
file old.png
real 0m37.453s
old.png: PNG image data, 25882 x 3035, 8-bit/color RGBA, non-interlaced
New graph_header_deps.py
(producing https://i.imgur.com/ZU0G52U.png )
time ./graph_header_deps.py | dot -Tpng > new.png
file new.png
real 0m1.063s
new.png: PNG image data, 6162 x 1344, 8-bit/color RGBA, non-interlaced
Differential Revision: https://reviews.llvm.org/D99124
Fangrui Song [Tue, 23 Mar 2021 18:11:26 +0000 (11:11 -0700)]
[test] Enable check-lsan on aarch64-*-linux
`check-lsan` passed on an aarch64-*-linux machine.
Unsupport `many_tls_keys_pthread.cpp` for now: it requires GetTls to include
`specific_1stblock` and `specific` in `struct pthread`.
Differential Revision: https://reviews.llvm.org/D98985
Louis Dionne [Tue, 23 Mar 2021 18:09:52 +0000 (14:09 -0400)]
[libc++] NFC: nodebug => no-debug in the CI configurations
Alex Zinenko [Tue, 23 Mar 2021 17:59:12 +0000 (18:59 +0100)]
[mlir] silence -Wunused-variable in release mode in Linalg transforms
Jonas Devlieghere [Tue, 23 Mar 2021 17:52:01 +0000 (10:52 -0700)]
[dsymutil] Only look for ThinLTO suffixes if we failed to find symbol.
Only look for symbols with the ThinLTO suffix if we fail to find the
symbol.
Tony [Tue, 23 Mar 2021 15:27:51 +0000 (15:27 +0000)]
[NFC][AMDGPU] Reserve AMD GPU ELF machine number 0x41
Reviewed By: foad
Differential Revision: https://reviews.llvm.org/D99196
Nicolas Vasilache [Tue, 23 Mar 2021 17:17:30 +0000 (17:17 +0000)]
[MLIR][Linalg] Hoist padding across multiple levels of tiling
This revision introduces proper backward slice computation during the hoisting of
PadTensorOp. This allows hoisting padding even across multiple levels of tiling.
Such hoisting requires the proper handling of loop bounds that may depend on enclosing
loop variables.
Differential revision: https://reviews.llvm.org/D98965
Paul Robinson [Thu, 18 Mar 2021 15:28:38 +0000 (08:28 -0700)]
Document -fcrash-diagnostics-dir
This was added in LLVM 7.0 but without help text or other docs.
Differential Revision: https://reviews.llvm.org/D98873
Marek Kurdej [Tue, 23 Mar 2021 16:15:07 +0000 (17:15 +0100)]
[libc++] [C++20] [P0482] Add missing tests and synopses for char8_t.
Left to finish P0482:
* <cuchar> header.
* Parts of <memory_resource> concerning char8_t. Also, tests for hash<pmr::*string>.
Reviewed By: ldionne, #libc, Quuxplusone
Differential Revision: https://reviews.llvm.org/D99184
Marek Kurdej [Tue, 23 Mar 2021 16:13:15 +0000 (17:13 +0100)]
[libc++] Add missing test_macros.h include in tests using TEST_STD_VER.
Siva Chandra [Mon, 22 Mar 2021 18:59:49 +0000 (18:59 +0000)]
[runtimes] Add the libc project to the list of runtimes.
This is possible as the default libc build now works under runtimes build.
Differential Revision: https://reviews.llvm.org/D99101
Adrian Prantl [Tue, 23 Mar 2021 01:09:46 +0000 (18:09 -0700)]
Teach DWARFExpression about DWARF 4+ Location Descriptions
DWARFExpression implements the DWARF2 expression model that left
ambiguity on whether the result of an expression was a value or an
address. This patch implements the DWARF location description model
introduces in DWARF 4 and sets the result Value's kind accordingly, if
the expression comes from a DWARF v4+ compile unit. The nomenclature
is taken from DWARF 5, chapter 2.6 "Location Descriptions".
Differential Revision: https://reviews.llvm.org/D98996