Gabor Marton [Wed, 9 Dec 2020 20:40:53 +0000 (21:40 +0100)]
[ASTImporter] Fix import of a typedef that has an attribute
The import of a typedefs with an attribute uses clang::Decl::setAttrs().
But that needs the ASTContext which we can get only from the
TranslationUnitDecl. But we can get the TUDecl only thourgh the
DeclContext, which is not set by the time of the setAttrs call.
Fix: import the attributes only after the DC is surely imported.
Btw, having the attribute import initiated from GetImportedOrCreateDecl was
fundamentally flawed. Now that is implicitly fixed.
Differential Revision: https://reviews.llvm.org/D92962
Roman Lebedev [Mon, 14 Dec 2020 14:44:17 +0000 (17:44 +0300)]
[SimplifyCFG] FoldBranchToCommonDest(): temporairly put back restrictions on liveout uses of bonus instructions (PR48450)
Even though
d38205144febf4dc42c9270c6aa3d978f1ef65e1 was mostly a correct
fix for the external non-PHI users, it's not a *generally* correct fix,
because the 'placeholder' values in those trivial PHI's we create
shouldn't be *always* 'undef', but the PHI itself for the backedges,
else we end up with wrong value, as the `@pr48450_2` test shows.
But we can't just do that, because we can't check that the PHI
can be it's own incoming value when coming from certain predecessor,
because we don't have a dominator tree.
So until we can address this correctness problem properly,
ensure that we don't perform the transformation
if there are such problematic external uses.
Making dominator tree available there is going to be involved,
since `-simplifycfg` pass currently does not preserve/update domtree...
Roman Lebedev [Mon, 14 Dec 2020 13:37:43 +0000 (16:37 +0300)]
[NFC][SimplifyCFG] FoldBranchToCommonDest(): pull out 'common successor' into a variable
Makes it easier to use it elsewhere
Roman Lebedev [Mon, 14 Dec 2020 12:30:38 +0000 (15:30 +0300)]
[NFC][SimplifyCFG] Add another miscompiled test for PR48450
Arthur O'Dwyer [Tue, 8 Dec 2020 21:15:01 +0000 (16:15 -0500)]
[libc++] ADL-proof <functional> by adding _VSTD:: qualification on calls.
- std::reference_wrapper
- std::function
- std::mem_fn
While I'm here, remove _VSTD:: qualification from calls to `declval`
because it takes no arguments and thus isn't susceptible to ADL.
Differential Revision: https://reviews.llvm.org/D92884
Arthur O'Dwyer [Sat, 12 Dec 2020 01:30:28 +0000 (20:30 -0500)]
[libc++] Consistently replace `::new(__p) T` with `::new ((void*)__p) T`. NFCI.
Everywhere, normalize the whitespace to `::new (EXPR) T`.
Everywhere, normalize the spelling of the cast to `(void*)EXPR`.
Without the cast to `(void*)`, the expression triggers ADL on GCC.
(I think this is a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98249)
Even if it doesn't trigger ADL, it still seems incorrect to use any argument
that's not exactly `(void*)` because that opens the possibility of overload
resolution picking a user-defined overload of `operator new`, which would be
wrong.
Differential Revision: https://reviews.llvm.org/D93153
Sylvain Audi [Fri, 30 Oct 2020 15:21:58 +0000 (11:21 -0400)]
[clang-scan-deps] Support clang-cl
clang-scan-deps contains some command line parsing and modifications.
This patch adds support for clang-cl command options.
Differential Revision: https://reviews.llvm.org/D92191
Siva Chandra Reddy [Mon, 14 Dec 2020 16:42:42 +0000 (08:42 -0800)]
[libc][Obvious] Include <fenv.h> from DummyFenv.h.
Stanislav Mekhanoshin [Tue, 24 Nov 2020 18:42:43 +0000 (10:42 -0800)]
[SLP] Control maximum vectorization factor from TTI
D82227 has added a proper check to limit PHI vectorization to the
maximum vector register size. That unfortunately resulted in at
least a couple of regressions on SystemZ and x86.
This change reverts PHI handling from D82227 and replaces it with
a more general check in SLPVectorizerPass::tryToVectorizeList().
Moved to tryToVectorizeList() it allows to restart vectorization
if initial chunk fails.
However, this function is more general and handles not only PHI
but everything which SLP handles. If vectorization factor would
be limited to maximum vector register size it would limit much
more vectorization than before leading to further regressions.
Therefore a new TTI callback getMaximumVF() is added with the
default 0 to preserve current behavior and limit nothing. Then
targets can decide what is better for them.
The callback gets ElementSize just like a similar getMinimumVF()
function and the main opcode of the chain. The latter is to avoid
regressions at least on the AMDGPU. We can have loads and stores
up to 128 bit wide, and <2 x 16> bit vector math on some
subtargets, where the rest shall not be vectorized. I.e. we need
to differentiate based on the element size and operation itself.
Differential Revision: https://reviews.llvm.org/D92059
Raul Tambre [Mon, 14 Dec 2020 16:41:30 +0000 (18:41 +0200)]
Revert "Re-apply "[CMake][compiler-rt][AArch64] Avoid preprocessing LSE builtins separately""
This reverts commit
03ebe1937192c247c4a7b8ec19dde2cf9845c914.
It's still breaking bots, e.g. http://green.lab.llvm.org/green/job/clang-stage1-RA/17027/console although it doesn't change any actual code.
The compile errors don't make much sense either. Revert for now.
Differential Revision: https://reviews.llvm.org/D93228
Jay Foad [Thu, 10 Dec 2020 16:49:48 +0000 (16:49 +0000)]
[AMDGPU] Make use of HasSMemRealTime predicate. NFC.
We have this subtarget feature so it makes sense to use it here. This is
NFC because it's always defined by default on GFX8+.
Differential Revision: https://reviews.llvm.org/D93202
Kazushi (Jam) Marukawa [Mon, 7 Dec 2020 11:44:05 +0000 (20:44 +0900)]
[VE] Add logical mask intrinsic instructions
Add andm, orm, xorm, eqvm, nndm, negm, pcvm, lzvm, and tovm intrinsic
instructions, a few pseudo instructions to expand logical intrinsic
using VM512, a mechnism to expand such pseudo instructions, and
regression tests. Also, assign vector mask types and vector mask
register classes correctly. This is required to use VM512 registers
as function arguments.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D93093
Simon Pilgrim [Mon, 14 Dec 2020 14:23:27 +0000 (14:23 +0000)]
[X86] LowerBUILD_VECTOR - track zero/nonzero elements with APInt masks. NFCI.
Prep work for undef/zero 'upper elements' handling as proposed in D92645.
Marek Kurdej [Mon, 14 Dec 2020 16:26:29 +0000 (17:26 +0100)]
[libc++] [P1164] Add tests for create_directories. NFC.
That's a follow-up patch after D92769.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D93026
Kazushi (Jam) Marukawa [Mon, 14 Dec 2020 14:59:16 +0000 (23:59 +0900)]
[VE] Correct addRegisterClass calls
Correct addRegisterClass calls for vector mask registers.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D93212
Andrzej Warzynski [Mon, 14 Dec 2020 16:07:24 +0000 (16:07 +0000)]
[flang][driver] Fix a small bug (auto vs auto&)
This bug hasn't affected us yet as our usage is too basic, i.e. we don't
rely on the defaults provided by `SetDefaultFortranOpts` just yet. This
will change shortly.
diggerlin [Mon, 14 Dec 2020 16:08:40 +0000 (11:08 -0500)]
[AIX] Fixed "comparison of unsigned expression >= 0 is always true" gcc warnings.
Summary:
fixed a Fixed "comparison of unsigned expression >= 0 is always true" gcc warnings.
http://lab.llvm.org:8011/#/builders/5/builds/2407/steps/2/logs/stdio
the error caused by patch https://reviews.llvm.org/D92398
Markus Lavin [Mon, 14 Dec 2020 14:37:34 +0000 (15:37 +0100)]
Reland [DebugInfo] Improve dbg preservation in LSR.
Use SCEV to salvage additional @llvm.dbg.value that have turned into
referencing undef after transformation (and traditional
salvageDebugInfo). Before rewrite (but after introduction of new
induction variables) use SCEV to compute an equivalent set of values for
each @llvm.dbg.value in the loop body (among the loop header PHI-nodes).
After rewrite (and dead PHI elimination) update those @llvm.dbg.value
now referencing undef by picking a remaining value from its equivalence
set. Allow match with offset by inserting compensation code in the
DIExpression.
Fixes : PR38815
Differential Revision: https://reviews.llvm.org/D87494
Arthur O'Dwyer [Fri, 11 Dec 2020 19:31:54 +0000 (14:31 -0500)]
generate_header_tests.py: Sort the header files ASCIIbetically.
Otherwise they come out in random (inode?) order.
Also `chmod +x` the generator, and re-run it. Somehow on Marek's
machine it produced \r\n line endings?! Open all files with
`newline='\n'` so that (if the Python3 docs are correct)
that won't happen again.
Differential Revision: https://reviews.llvm.org/D93137
Arthur O'Dwyer [Sat, 12 Dec 2020 16:57:32 +0000 (11:57 -0500)]
[libc++] Fix some one-off typos in comments. NFCI.
Arthur O'Dwyer [Sat, 12 Dec 2020 16:58:26 +0000 (11:58 -0500)]
[libc++] Remove __is_construct::__nat. NFCI.
This type has been unused since commit
5b4cc84b87232e67afb63e2bad429b3211b26964.
Arthur O'Dwyer [Sat, 12 Dec 2020 16:43:15 +0000 (11:43 -0500)]
[libc++] s/insertible/insertable/g. NFCI.
Arthur O'Dwyer [Sat, 12 Dec 2020 16:37:36 +0000 (11:37 -0500)]
[libc++] s/Birdirectional/Bidirectional/g. NFCI.
Raul Tambre [Mon, 14 Dec 2020 14:40:20 +0000 (16:40 +0200)]
Re-apply "[CMake][compiler-rt][AArch64] Avoid preprocessing LSE builtins separately"
aa772fc85e0f526615c78b9c3979c2be945a754c (D92530) has landed fixing Apple builds.
Previous quick-fix
d9697c2e6b153ac7dc40a69450d9b672f71b1029 (D93198) included in this commit.
Invoking the preprocessor ourselves is fragile and would require us to replicate CMake's handling of definitions, compiler flags, etc for proper compatibility.
In my toolchain builds this notably resulted in a bunch of warnings from unused flags as my CMAKE_C_FLAGS includes CPU-specific optimization options.
Notably this part was already duplicating the logic for VISIBILITY_HIDDEN define.
Instead, symlink the files and set the proper set of defines on each.
This should also be faster as we avoid invoking the compiler multiple times.
Fixes https://llvm.org/PR48494
Differential Revision: https://reviews.llvm.org/D93211
Kuba Mracek [Mon, 14 Dec 2020 14:36:41 +0000 (16:36 +0200)]
[compiler-rt] [builtins] Make lse.S compile on Darwin
Reviewed By: ilinpv
Differential Revision: https://reviews.llvm.org/D92530
Florian Hahn [Mon, 14 Dec 2020 14:13:59 +0000 (14:13 +0000)]
[VPlan] Make VPWidenMemoryInstructionRecipe a VPDef.
This patch updates VPWidenMemoryInstructionRecipe to use VPDef
to manage the value it produces instead of inheriting from VPValue.
Reviewed By: gilr
Differential Revision: https://reviews.llvm.org/D90563
David Spickett [Mon, 30 Nov 2020 11:32:46 +0000 (11:32 +0000)]
[llvm-objdump] Use "--" for long options in --help text
Single dash for these options is not recognised.
Changes found by running this on the --help output
and the user guide:
grep -e ' -[a-zA-Z]\{2,\}'
The user guide was updated in https://reviews.llvm.org/D92305
so no change there.
Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D92310
Raphael Isemann [Mon, 14 Dec 2020 13:03:38 +0000 (14:03 +0100)]
Revert "Consider reference, pointer, and pointer-to-member TemplateArguments to be different if they have different types."
This reverts commit
05cdf4acf42acce9ddcff646a5d6ac666710fe6d. It breaks stage-2
compilation of LLVM, see https://reviews.llvm.org/D91488#2451534
Anton Afanasyev [Sun, 13 Dec 2020 11:42:25 +0000 (14:42 +0300)]
[SLP] Fix vector element size for the store chains
Vector element size could be different for different store chains.
This patch prevents wrong computation of maximum number of elements
for that case.
Differential Revision: https://reviews.llvm.org/D93192
Simon Pilgrim [Mon, 14 Dec 2020 12:12:08 +0000 (12:12 +0000)]
[TableGen] Don't dereference from dyn_cast<> - use cast<> instead. NFCI.
dyn_cast<> can return null if the cast fails, resulting in null dereferences and static analyzer warnings. We should use cast<> instead.
Simon Pilgrim [Mon, 14 Dec 2020 11:39:43 +0000 (11:39 +0000)]
[IRCE] Add test case for PR48051
Kerry McLaughlin [Mon, 14 Dec 2020 10:46:32 +0000 (10:46 +0000)]
[SVE][CodeGen] Lower scalable floating-point vector reductions
Changes in this patch:
- Minor changes to the LowerVECREDUCE_SEQ_FADD function added by @cameron.mcinally
to also work for scalable types
- Added TableGen patterns for FP reductions with unpacked types (nxv2f16, nxv4f16 & nxv2f32)
- Asserts added to expandFMINNUM_FMAXNUM & expandVecReduceSeq for scalable types
Reviewed By: cameron.mcinally
Differential Revision: https://reviews.llvm.org/D93050
David Green [Mon, 14 Dec 2020 11:17:01 +0000 (11:17 +0000)]
[ARM] Improve handling of empty VPT blocks in tail predicated loops
A vpt block that just contains either VPST;VCTP or VPT;VCTP, once the
VCTP is removed will become invalid. This fixed the first by removing
the now empty block and bails out for the second, as we have no simple
way of converting a VPT to a VCMP.
Differential Revision: https://reviews.llvm.org/D92369
Carl Ritson [Mon, 14 Dec 2020 11:01:49 +0000 (20:01 +0900)]
[AMDGPU][NFC] Rename opsel/opsel_hi/neg_lo/neg_hi with suffix 0
These parameters set a default value of 0, so I believe they
should include a 0 suffix. This allows for versions which do not
set a default value in future.
Reviewed By: foad
Differential Revision: https://reviews.llvm.org/D93187
Carl Ritson [Mon, 14 Dec 2020 11:00:53 +0000 (20:00 +0900)]
[AMDGPU][NFC] Remove unused VOP3Mods0Clamp
This is unused and the selection function does not exist.
Reviewed By: foad
Differential Revision: https://reviews.llvm.org/D93188
Raul Tambre [Mon, 14 Dec 2020 09:07:31 +0000 (11:07 +0200)]
[XRay] Remove unnecessary <x86intrin.h> include
It hasn't been necessary since commit
4d4ed0e288bf1f3a90fba6e5b56bc25e2fe961c3 (D43278).
Reviewed By: dberris
Differential Revision: https://reviews.llvm.org/D93196
Frederik Gossen [Fri, 11 Dec 2020 16:54:53 +0000 (17:54 +0100)]
[MLIR] Add atan and atan2 lowerings to CUDA intrinsics
Differential Revision: https://reviews.llvm.org/D93124
Sebastian Neubauer [Wed, 9 Dec 2020 16:25:53 +0000 (17:25 +0100)]
[AMDGPU] Mark amdgpu_gfx functions as module entry function
- Allows lds allocations
- Writes resource usage into COMPUTE_PGM_RSRC1 registers in PAL metadata
Differential Revision: https://reviews.llvm.org/D92946
Frederik Gossen [Fri, 11 Dec 2020 17:00:17 +0000 (18:00 +0100)]
[MLIR] Add lowerings for atan and atan2 to ROCDL intrinsics
Differential Revision: https://reviews.llvm.org/D93123
Raul Tambre [Mon, 14 Dec 2020 09:40:24 +0000 (11:40 +0200)]
Revert "[CMake][compiler-rt][AArch64] Avoid preprocessing LSE builtins separately"
Causing issues on Apple buildbots.
http://green.lab.llvm.org/green/job/clang-stage1-RA/17019/console
This reverts commit
33b740f8dc3496237619a7bc6722f23655cb1f94.
This reverts commit
d9697c2e6b153ac7dc40a69450d9b672f71b1029.
Differential Revision: https://reviews.llvm.org/D93199
Raul Tambre [Mon, 14 Dec 2020 09:24:02 +0000 (11:24 +0200)]
[compiler-rt][CMake] Define HAS_ASM_LSE on Apple if available
Should hopefully fix
33b740f8dc3496237619a7bc6722f23655cb1f94 (D93178) failing on bots.
Differential Revision: https://reviews.llvm.org/D93198
Jan Svoboda [Mon, 14 Dec 2020 09:03:18 +0000 (10:03 +0100)]
[clang][cli] Port FileSystem options to new option parsing system
Depends on D84187
Reviewed By: dexonsmith
Original patch by Daniel Grumberg.
Differential Revision: https://reviews.llvm.org/D84188
Georgii Rymar [Thu, 10 Dec 2020 13:12:26 +0000 (16:12 +0300)]
[llvm-readobj] - For SHT_REL relocations, don't display an addend.
This is https://bugs.llvm.org/show_bug.cgi?id=44257.
In LLVM style we always print `0` as addend when dumping
SHT_REL relocations. It is confusing, this patch stops
printing it as the first comment on the bug page suggests.
Differential revision: https://reviews.llvm.org/D93033
Jan Svoboda [Mon, 14 Dec 2020 08:49:55 +0000 (09:49 +0100)]
[clang][cli] Better defaults for MarshallingInfoString
Depends on D84018
Reviewed By: Bigcheese
Original patch by Daniel Grumberg.
Differential Revision: https://reviews.llvm.org/D84185
Georgii Rymar [Fri, 11 Dec 2020 09:46:30 +0000 (12:46 +0300)]
[llvm-readelf] - Improve ELF type field dumping.
This is related to https://bugs.llvm.org/show_bug.cgi?id=40868.
Currently we don't print `OS Specific`/``Processor Specific`/`<unknown>`
prefixes when dumping the ELF file type. This is not consistent
with GNU readelf. The patch fixes it.
Also, this patch removes the `types.test`, because we already have
`file-types.test`, which tests more cases and this patch revealed that
we have such a duplicate.
Differential revision: https://reviews.llvm.org/D93096
Jan Svoboda [Fri, 11 Dec 2020 15:19:03 +0000 (16:19 +0100)]
[clang][cli] Port Preprocessor and PreprocessorOutput option flags to new option parsing system
Depends on D83979
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D84018
sameeran joshi [Mon, 14 Dec 2020 08:00:26 +0000 (13:30 +0530)]
[Flang][OpenMP-5.0] Semantic checks for flush construct.
From OMP 5.0 [2.17.8]
Restriction:
If memory-order-clause is release,acquire, or acq_rel, list items must not be specified on the flush directive.
Reviewed By: kiranchandramohan, clementval
Differential Revision: https://reviews.llvm.org/D89879
Haojian Wu [Mon, 14 Dec 2020 07:55:47 +0000 (08:55 +0100)]
[clangd] Go-to-definition on pure virtual method decls jumps to all overrides.
Reviewed By: usaxena95
Differential Revision: https://reviews.llvm.org/D92299
QingShan Zhang [Mon, 14 Dec 2020 07:39:06 +0000 (07:39 +0000)]
[PowerPC][FP128] Fix the incorrect signature for math library call
The runtime library has two family library implementation for ppc_fp128 and fp128.
For IBM Long double(ppc_fp128), it is suffixed with 'l', i.e(sqrtl). For
IEEE Long double(fp128), it is suffixed with "ieee128" or "f128".
We miss to map several libcall for IEEE Long double.
Reviewed By: qiucf
Differential Revision: https://reviews.llvm.org/D91675
Haojian Wu [Mon, 14 Dec 2020 07:45:13 +0000 (08:45 +0100)]
[AST][RecoveryExpr] Preserve type for broken overrload member call expr.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D80109
sameeran joshi [Mon, 14 Dec 2020 07:11:39 +0000 (12:41 +0530)]
[Flang][OpenMP] Semantic checks for Atomic construct.
Patch implements restrictions from 2.17.7 of OpenMP 5.0 standard for atomic Construct. Tests for the same are added.
One of the restriction
`OpenMP constructs may not be encountered during execution of an atomic region.`
Is mentioned in 5.0 standard to be a semantic restriction, but given the stricter nature of parser in F18 it's caught at parsing itself.
This patch is a next patch in series from D88965.
Reviewed By: clementval
Differential Revision: https://reviews.llvm.org/D89583
Craig Topper [Mon, 14 Dec 2020 04:26:00 +0000 (20:26 -0800)]
[LoopIdiom] Pre-commit tests for D92745. NFC
Raul Tambre [Sun, 13 Dec 2020 14:48:26 +0000 (16:48 +0200)]
[CMake][compiler-rt][AArch64] Avoid preprocessing LSE builtins separately
Invoking the preprocessor ourselves is fragile and would require us to replicate CMake's handling of definitions, compiler flags, etc for proper compatibility.
In my toolchain builds this notably resulted in a bunch of warnings from unused flags as my CMAKE_C_FLAGS includes CPU-specific optimization options.
Notably this part was already duplicating the logic for VISIBILITY_HIDDEN define.
Instead, symlink the files and set the proper set of defines on each.
This should also be faster as we avoid invoking the compiler multiple times.
Fixes https://llvm.org/PR48494
Reviewed By: ilinpv
Differential Revision: https://reviews.llvm.org/D93178
Richard Smith [Mon, 14 Dec 2020 06:41:19 +0000 (22:41 -0800)]
Fix test expectation to cope with custom version namespaces.
Richard Smith [Sun, 15 Nov 2020 01:37:25 +0000 (17:37 -0800)]
Consider reference, pointer, and pointer-to-member TemplateArguments to be different if they have different types.
For the Itanium ABI, this implements the mangling rule suggested in
https://github.com/itanium-cxx-abi/cxx-abi/issues/47, namely mangling
such template arguments as being cast to the parameter type in the case
where the template name is overloadable. This can cause a mangling
change for rare cases, where
* the template argument declaration is converted from its declared type
to the type of the template parameter, and
* the template parameter either has a deduced type or is a parameter of
a function template.
However, such changes are necessary to avoid mangling collisions. The
ABI changes can be reversed with -fclang-abi-compat=11 or earlier.
Re-commit with a fix for the regression introduced last time: don't
expect parameters and arguments to line up inside an <unresolved-name>
mangling.
Differential Revision: https://reviews.llvm.org/D91488
Richard Smith [Sun, 13 Dec 2020 08:50:01 +0000 (00:50 -0800)]
Factor out and centralize repeated 'getExpandedPackSize'.
Anton Afanasyev [Sun, 13 Dec 2020 11:00:08 +0000 (14:00 +0300)]
[SLP][Test] Precommit test for D93192
This test shows failure of combined stores chains vectorization
Chen Zheng [Wed, 25 Nov 2020 02:33:13 +0000 (21:33 -0500)]
[MachineCombiner][NFC] Add MustReduceRegisterPressure goal
add a new goal MustReduceRegisterPressure for machine combiner pass.
PowerPC will use this new goal to do some register pressure related optimization.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D92068
Kazu Hirata [Mon, 14 Dec 2020 04:05:47 +0000 (20:05 -0800)]
[CodeGen] Use llvm::erase_value (NFC)
Kazu Hirata [Mon, 14 Dec 2020 03:35:10 +0000 (19:35 -0800)]
[Target] Use llvm::is_contained (NFC)
Arthur Eubanks [Mon, 14 Dec 2020 03:13:48 +0000 (19:13 -0800)]
[opt][NPM] Pin -lower-amx-type to legacy PM
This is part of the codegen pipeline.
Lang Hames [Mon, 14 Dec 2020 02:38:00 +0000 (13:38 +1100)]
Re-apply
8904ee8ac7e with missing header included this time.
Nico Weber [Mon, 14 Dec 2020 02:30:38 +0000 (21:30 -0500)]
Revert "[JITLink] Add JITLinkDylib type, thread through JITLinkMemoryManager APIs."
This reverts commit
8904ee8ac7ebcc50a60de0914abc6862e28b6664.
Didn't `git add` llvm/ExecutionEngine/JITLink/JITLinkDylib.h and hence doesn't
build anywhere.
Lang Hames [Mon, 14 Dec 2020 00:14:25 +0000 (11:14 +1100)]
[JITLink] Add JITLinkDylib type, thread through JITLinkMemoryManager APIs.
JITLinkDylib represents a target dylib for a JITLink link. By representing this
explicitly we can:
- Enable JITLinkMemoryManagers to manage allocations on a per-dylib basis
(e.g by maintaining a seperate allocation pool for each JITLinkDylib).
- Enable new features and diagnostics that require information about the
target dylib (not implemented in this patch).
Lang Hames [Sun, 13 Dec 2020 23:41:07 +0000 (10:41 +1100)]
[JITLink] Fix include guard end comment.
Lang Hames [Sun, 13 Dec 2020 08:53:18 +0000 (19:53 +1100)]
[ORC] Prefer preincrement on iterator.
Nathan Ridge [Sun, 8 Nov 2020 07:58:17 +0000 (02:58 -0500)]
[clangd] Fix locateMacroAt() for macro definition outside preamble
Fixes https://github.com/clangd/clangd/issues/577
Differential Revision: https://reviews.llvm.org/D91025
Tony [Sun, 13 Dec 2020 00:38:40 +0000 (00:38 +0000)]
[NFC][AMDGPU] Reformat AMD GPU targets in cuda.cpp
Differential Revision: https://reviews.llvm.org/D93181
Craig Topper [Sun, 13 Dec 2020 20:35:24 +0000 (12:35 -0800)]
[X86] Add ExeDomain = SSEPackedSingle to cvtss2sd and cvtsd2ss instrutions.
Prep for D92993
Craig Topper [Sun, 13 Dec 2020 19:44:38 +0000 (11:44 -0800)]
[X86] Add isel patterns to form VPDPWSSD from (add (vpmaddwd X, Y), Z) when AVXVNNI is enabled.
We already have these patterns for AVX512VNNI.
Nikita Popov [Sun, 13 Dec 2020 19:56:20 +0000 (20:56 +0100)]
[AC] Handle (X+C1)<C2 assumes (PR48408)
InstCombine canonicalizes X>C && X<C' style comparisons into
(X+C1)<C2. This type of expression is recognized by some analyses
like LVI, but currently not when used inside assumptions, because
AssumptionCache does not track affected values for it.
Harald van Dijk [Sun, 13 Dec 2020 18:33:10 +0000 (18:33 +0000)]
[X86] Extend varargs test
This extends the existing x86-64-varargs test by passing enough
arguments that they need to be passed in memory, and by passing them in
reverse order, using va_arg for each argument to retrieve them and
restoring them to the correct order, and by using va_copy to have two
va_lists to use with va_arg.
Kazu Hirata [Sun, 13 Dec 2020 18:03:45 +0000 (10:03 -0800)]
[Analysis] Remove unused declaration replaceEdgeKey (NFC)
The declaration was introduced without a corresponding definition on
Feb 9, 2017 in commit
aaad9f84be2a6a3eb8202ed4eaa5e5e2021d055e.
Kazu Hirata [Sun, 13 Dec 2020 17:48:47 +0000 (09:48 -0800)]
[Transforms] Use llvm::erase_value (NFC)
Tony [Sun, 13 Dec 2020 01:06:18 +0000 (01:06 +0000)]
[NFC]{AMDGPU] Update AMDGPUUsage with AMD RDNA 2 reference
Differential Revision: https://reviews.llvm.org/D93172
Simon Pilgrim [Sun, 13 Dec 2020 17:18:07 +0000 (17:18 +0000)]
[X86][SSE] combineX86ShufflesRecursively - add basic handling for combining shuffles of different widths (PR45974)
If a faux shuffle uses smaller shuffle inputs, try to recursively combine with those inputs directly instead of widening them immediately. Then widen all smaller inputs at the bottom of the recursion.
This will still mean we're generating nodes on the fly (PR45974) even if we don't combine to a new shuffle but it does help AVX2+ targets combine across xmm/ymm/zmm types, mainly as variable shuffles.
Simon Pilgrim [Sun, 13 Dec 2020 16:43:17 +0000 (16:43 +0000)]
[X86][AVX] Add additional X86ISD::SUBV_BROADCAST_LOAD test case for D92645
Suggested by @yubing - to check whether we can reuse a single subvector broadcast for 128/256/512-bit vectors.
Florian Hahn [Sun, 13 Dec 2020 16:28:22 +0000 (16:28 +0000)]
[VPlan] Use interleaveComma in printOperands() (NFC).
Florian Hahn [Sun, 13 Dec 2020 15:46:13 +0000 (15:46 +0000)]
Recommit "[AArch64] Lower calls with rv_marker attribute."
This recommits
a87fccb3ff9c with a fix to mark the destination operand
of the marker instruction as def, to fix a machine verifier failure.
This reverts the revert commit
c0f2cea7c0afc7c9688e1633f2a9b25c8ea4a9bd.
Simon Pilgrim [Sun, 13 Dec 2020 15:37:35 +0000 (15:37 +0000)]
[X86] Convert fadd/fmul _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)
Followup to D87604, having confirmed on PR47506 that we can use the llvm codegen expansion for fadd/fmul as well.
Differential Revision: https://reviews.llvm.org/D92940
Simon Pilgrim [Sun, 13 Dec 2020 15:16:21 +0000 (15:16 +0000)]
[X86][SSE] combineReductionToHorizontal - add vXi8 ISD::MUL reduction handling (PR39709)
Default expansion leads to repeated extensions/truncations to/from vXi16 which shuffle combining and demanded elts can't completely unravel.
Better just to promote (any_extend) the input and perform a vXi16 reduction.
We'll be able to remove a lot of this if we ever get decent legalization support for reduction intrinsics in SelectionDAG.
Jacques Pienaar [Sun, 13 Dec 2020 15:21:32 +0000 (07:21 -0800)]
Don't emit on op diagnostic in reproducer emission
This avoids dumping the module post emitting a reproducer, which results in
many MB logs where a reproducer has already been neatly generated.
Differential Revision: https://reviews.llvm.org/D93165
ergawy [Sun, 13 Dec 2020 14:56:37 +0000 (09:56 -0500)]
[MLIR][SPIRV] Add support for GLSL F/U/SClamp.
Adds support for 3 ternary ops from SPIR-V extended instructions for
GLSL. Namely, adds support for FClamp, UClamp, and SClamp.
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D92859
Simon Pilgrim [Wed, 9 Dec 2020 18:18:50 +0000 (18:18 +0000)]
[X86] Regenerate vector-reduce-mul.ll with common check prefixes. NFC.
Try to merge AVX1/AVX2/AVX512 codegen checks where possible
Björn Schäpers [Sat, 28 Nov 2020 04:58:58 +0000 (05:58 +0100)]
[clang-format] Remove double trim
Lines[i] is already trimmed 3 lines before
Differential Revision: https://reviews.llvm.org/D91996
Nikita Popov [Thu, 10 Dec 2020 21:29:33 +0000 (22:29 +0100)]
[BasicAA] Handle known non-zero variable index
BasicAA currently handles cases like Scale*V0 + (-Scale)*V1 where
V0 != V1, but does not handle the simpler case of Scale*V with
V != 0. Add it based on an isKnownNonZero() call.
I'm not passing a context instruction for now, because the existing
approach of always using GEP1 for context could result in symmetry
issues.
Differential Revision: https://reviews.llvm.org/D93162
Kazushi (Jam) Marukawa [Thu, 10 Dec 2020 08:53:07 +0000 (17:53 +0900)]
[VE] Optimize toolchain regression test
Optimize toolchain regression test for VE by removing not a useful test
(-fuse-init-array test) and merge several tests to one test which checks
default behavior of driver. Also add sysroot to reduce conflicts.
These are suggested in https://reviews.llvm.org/D92996.
Thank you so much.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D93084
Michał Górny [Sun, 13 Dec 2020 08:18:41 +0000 (09:18 +0100)]
[lldb] [Process/FreeBSD] Add more 'override' keywords
Christian Sigg [Sat, 12 Dec 2020 09:50:41 +0000 (10:50 +0100)]
[mlir] Use mlir::OpState::operator->() to get to methods of mlir::Operation.
This is a preparation step to remove those methods from OpState.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D93098
Chris Lattner [Sun, 13 Dec 2020 05:24:18 +0000 (21:24 -0800)]
[AsmParser] Fix support for zero bit integer types.
Zero bit integer types are supported by IntegerType for consistency,
but the asmparser never got updated. Allow them to be parsed, as
required to fix CIRCT issue #316
Differential Revision: https://reviews.llvm.org/D93089
kweisamx [Sun, 13 Dec 2020 03:06:32 +0000 (03:06 +0000)]
[mlir] Add Python binding for MLIR Dict Attribute
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D93004
Nico Weber [Sun, 13 Dec 2020 02:10:52 +0000 (21:10 -0500)]
[mac/arm] Deflake 3 check-llvm tests
On macOS/arm, signature verification has kill semantics by default.
Signature verification is cached with a file's inode (actually, vnode),
and if a new executable is copied over an existing file (which reuses
the inode), the cache isn't invalidated. So when the new executable
is executed, the kernel still has the old content's signature cached
and the kills the executable because the old signatue doesn't match
the new contents (https://openradar.appspot.com/
FB8914243).
As workaround, rm the desitnation files first, to ensure they have
a fresh vnode (and hence no stale cached signature) after the copy.
Part of PR46647. See also
e0e334a9c1ac for a similar change.
Chris Sears [Sat, 12 Dec 2020 15:23:55 +0000 (10:23 -0500)]
X86: Correcting X86OutgoingValueHandler typo (NFC)
https://reviews.llvm.org/D92631
Nico Weber [Sun, 13 Dec 2020 01:19:33 +0000 (20:19 -0500)]
fix typos to cycle bots
Nico Weber [Sun, 13 Dec 2020 01:16:14 +0000 (20:16 -0500)]
fix typo to cycle bots
Nico Weber [Sun, 13 Dec 2020 01:11:14 +0000 (20:11 -0500)]
mac/arm: XFAIL the last 2 failing check-llvm tests
We should fix them, but let's XFAIL them for now so that we can start
running check-llvm on bots and lock in the passing tests.
Part of PR46647.
Fangrui Song [Sun, 13 Dec 2020 00:50:25 +0000 (16:50 -0800)]
[ELF][test] Rewrite st_value=0 copy relocation tests
The original tests have unneeded symbols and copy-relocation-zero-abs-addr.s
does not actually test anything.
Rewrite them and add copy-relocation-zero-addr.s instead.
Add --soname=b so that the address 0x203400 will be stable. (When linking an
executable with %t.so, the path %t.so will be recorded in the DT_NEEDED entry if
%t.so doesn't have DT_SONAME. .dynstr will have varying lengths on different
systems.)
Nico Weber [Sun, 13 Dec 2020 00:44:10 +0000 (19:44 -0500)]
[mac/arm] skip MappedMemoryTest that try to map w+x
macOS/arm is w^x, so these tests don't work. Fixes these failures:
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndReleaseHuge/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.BasicWrite/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/4
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleWrite/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/5
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/5
Part of PR46647.
Craig Topper [Sun, 13 Dec 2020 00:37:28 +0000 (16:37 -0800)]
[X86] Autogenerate complete checks. NFC
Amara Emerson [Sat, 12 Dec 2020 22:57:36 +0000 (14:57 -0800)]
[[GlobalISel][IRTranslator] Fix a crash when the use of an extractvalue is a non-dominated metadata use.
We don't expect uses to come before defs in the CFG, so allocateVRegs() asserted.
Fixes PR48211