Johannes Doerfert [Thu, 15 Jul 2021 18:12:00 +0000 (13:12 -0500)]
[OpenMP] Fix carefully track SPMDCompatibilityTracker
We did not properly use SPMDCompatibilityTracker in various places.
This patch makes sure we look at the validity properly and also fix
the state if we can.
Differential Revision: https://reviews.llvm.org/D106085
Albion Fung [Tue, 20 Jul 2021 02:27:02 +0000 (21:27 -0500)]
Revert "[PowerPC] Extra test case for LDARX"
This reverts commit
1d3e77e7a8421a9d2dd13e3ef499ea967ea8f85c as
some buildbots seem to be unable to obtain the target
powerpc64le-unknown-linux-gnu.
Tony Tye [Tue, 20 Jul 2021 01:20:22 +0000 (01:20 +0000)]
[NFC] Correct documentation error in OpenMP release ReleaseNotes
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D106330
Lang Hames [Mon, 19 Jul 2021 23:06:39 +0000 (09:06 +1000)]
[ORC-RT] Introduce a ORC_RT_JIT_DISPATCH_TAG macro.
This macro can be used to define tag variables for use with jit-dispatch.
Lang Hames [Mon, 19 Jul 2021 22:52:21 +0000 (08:52 +1000)]
[ORC-RT] Add ORC_RT prefix to WEAK_IMPORT macro.
Hsiangkai Wang [Mon, 19 Jul 2021 08:57:41 +0000 (16:57 +0800)]
[Clang][RISCV] Correct the alignment of stores generated by vlseg/vlsegff.
Differential Revision: https://reviews.llvm.org/D106255
Fangrui Song [Tue, 20 Jul 2021 01:13:52 +0000 (18:13 -0700)]
Revert D106128 "[lld-macho] Use DO_BIND_ADD_ADDR_IMM_SCALED for bind opcodes"
This reverts commit
321b2bef098553ec648e4174aae92c63a6e1a810.
`for (BindIR *p = &opcodes[0]; p->opcode != BIND_OPCODE_DONE; ++p) {` has a heap-buffer-overflow with test/MachO/bind-opcodes.
Shilei Tian [Tue, 20 Jul 2021 01:08:40 +0000 (21:08 -0400)]
[OpenMP] Fixed a segmentation fault when using taskloop and target nowait
The synchronization of task loop misses hidden helper tasks, causing segmentation
fault reported in https://bugs.llvm.org/show_bug.cgi?id=50002.
Reviewed By: ye-luo
Differential Revision: https://reviews.llvm.org/D106220
Matt Arsenault [Wed, 12 May 2021 21:10:24 +0000 (17:10 -0400)]
CodeGen: Make MachineOptimizationRemarkEmitterPass a CFG analysis
This avoids rerunning it a few times.
Albion Fung [Tue, 20 Jul 2021 01:03:22 +0000 (20:03 -0500)]
[PowerPC] Extra test case for LDARX
An extra test case added for the builtin __LDARX.
Differential revision: https://reviews.llvm.org/D105926
Matt Arsenault [Fri, 16 Jul 2021 23:59:22 +0000 (19:59 -0400)]
GlobalISel: Remove some mystery code that clears isReturned
I don't understand what this is going for, and haven't found an analog
in DAG code. No tests fail with this removed.
Matt Arsenault [Fri, 16 Jul 2021 13:54:52 +0000 (09:54 -0400)]
AArch64/GlobalISel: Preserve memory types
Fangrui Song [Tue, 20 Jul 2021 00:09:01 +0000 (17:09 -0700)]
Revert D105519 "[WebAssembly] Deduplicate imports of the same module name, field name, and type" and its followup
This reverts commit
4ae575b9997e0903d1c2ec01a43e3f3f2db5df16 and
9b965b37c75d626c01951184088314590e38d299.
There is an use-of-uninitialized-value bug in the `else` branch in ImportSection::addImport.
Joseph Huber [Mon, 19 Jul 2021 20:54:31 +0000 (16:54 -0400)]
[Libomptarget] Remove volatile from NVPTX work function
Currently the NPVTX work function is marked volatile. This prevents some
optimizations from using this value.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D106310
Nico Weber [Mon, 19 Jul 2021 23:57:02 +0000 (19:57 -0400)]
[gn build] Fix llvm_build_instrumented_coverage=true builds with goma/rbe
Louis Dionne [Fri, 16 Jul 2021 19:52:42 +0000 (15:52 -0400)]
[libc++] Tidy-up instances of __STDCPP_DEFAULT_NEW_ALIGNMENT__ in the tests
See https://reviews.llvm.org/D105905 for context.
Differential Revision: https://reviews.llvm.org/D106182
Louis Dionne [Mon, 19 Jul 2021 16:34:56 +0000 (12:34 -0400)]
[libc++] Add a bunch of missing _LIBCPP_HIDE_FROM_ABI in <ranges>
We've been forgetting to add those to most of the <ranges> review.
To avoid forgetting in the future, I added an item in the pre-commit
checklist.
Differential Revision: https://reviews.llvm.org/D106287
Philip Reames [Mon, 19 Jul 2021 23:33:01 +0000 (16:33 -0700)]
[tests] Add a couple of tests for zero stride trip counts w/loop varying exit values
Vincent Lee [Fri, 16 Jul 2021 03:25:48 +0000 (20:25 -0700)]
[lld-macho] Use DO_BIND_ADD_ADDR_IMM_SCALED for bind opcodes
Implement pass 3 of bind opcodes from ld64 (which supports both 32-bit and 64-bit).
Pass 3 implementation condenses BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB opcode
to BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED. This change is already behind an
O2 flag so it shouldn't impact current performance. I verified ld64's output with x86_64 LLD
and they were both emitting the same optimized bind opcodes (although in a slightly different
order). Tested with arm64_32 LLD and compared that with x86 LLD that the order of the bind
opcodes are the same (offset values are different which should be expected).
Reviewed By: int3, #lld-macho
Differential Revision: https://reviews.llvm.org/D106128
Eli Friedman [Fri, 16 Jul 2021 23:21:20 +0000 (16:21 -0700)]
[ScalarEvolution] Refine computeMaxBECountForLT to be accurate in more cases.
Allow arbitrary strides, and make sure we return the correct result when
the backedge-taken count is zero.
Differential Revision: https://reviews.llvm.org/D106197
Yi Zhang [Mon, 19 Jul 2021 22:10:13 +0000 (15:10 -0700)]
Dyanamic shape support for memref reassociation reshape ops
Only memref with identity layout map is supported for now.
Reviewed By: mravishankar
Differential Revision: https://reviews.llvm.org/D106180
Philip Reames [Mon, 19 Jul 2021 22:11:38 +0000 (15:11 -0700)]
[SCEV] Add a clarifying comment in howManyLessThans
Wrap semantics are subtle when combined with multiple exits. This has caused several rounds of confusion during recent reviews, so try to document the subtly distinction between when wrap flags provide <u and <=u facts.
Arthur Eubanks [Mon, 19 Jul 2021 20:35:57 +0000 (13:35 -0700)]
[NewPM][opt] Add -debug-pass-manager=quiet to not print analysis info
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D106307
Arthur Eubanks [Mon, 19 Jul 2021 20:20:57 +0000 (13:20 -0700)]
[NewPM] Bail out of devirtualization wrapper if the current SCC is invalidated
The specific case that triggered this was when inlining a recursive
internal function into itself caused the recursion to go away, allowing
the inliner to mark the function as dead. The inliner marks the SCC as
invalidated but does not provide a new SCC to continue with.
This matches the implementations of ModuleToPostOrderCGSCCPassAdaptor
and CGSCCPassManager.
Fixes PR50363.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D106306
Quinn Pham [Fri, 16 Jul 2021 16:48:00 +0000 (11:48 -0500)]
[PowerPC] swdiv_nochk Builtins for XL Compat
This patch is in a series of patches to provide builtins for
compatibility with the XL compiler. This patch adds software divide
builtins with no checking. These builtins are each emitted as a fast
fdiv.
Reviewed By: #powerpc, nemanjai
Differential Revision: https://reviews.llvm.org/D106150
MaheshRavishankar [Mon, 19 Jul 2021 21:35:20 +0000 (14:35 -0700)]
Split `InferShapedTypeOpInterface` to create `ReifyRankedShapedTypeInterface`.
The `reifyReturnTypeShapesPerResultDim` method supports shape
inference for rsults that are ranked types. These are used lower in
the codegeneration stack than its counter part `reifyReturnTypeShapes`
which also supports unranked types, and is more suited for use higher
up the compilation stack. To have separation of concerns, this method
is split into its own interface.
See discussion : https://llvm.discourse.group/t/better-layering-for-infershapedtypeopinterface/3823
Differential Revision: https://reviews.llvm.org/D106133
LLVM GN Syncbot [Mon, 19 Jul 2021 21:33:24 +0000 (21:33 +0000)]
[gn build] Port
08b289867b5a
Nathan Ridge [Mon, 21 Jun 2021 07:19:19 +0000 (03:19 -0400)]
[clang] Respect PrintingPolicy::FullyQualifiedName when printing a template-id
Fixes PR50774
Differential Revision: https://reviews.llvm.org/D104619
Sam Clegg [Thu, 15 Jul 2021 00:16:15 +0000 (17:16 -0700)]
[lld][WebAssembly] Cleanup duplicate fields in Symbols.h. NFC
This avoids duplication and simplifies the code in several places
without increasing the size of the symbol union (at least not
above the assert'd limit of 120 bytes).
Differential Revision: https://reviews.llvm.org/D106026
Jim Ingham [Mon, 19 Jul 2021 21:25:37 +0000 (14:25 -0700)]
Don't use !eStateRunning when you mean eStateStopped in DestroyImpl.
When we go to destroy the process, we first try to halt it, if
we succeeded and the target stopped, we want to clear out the
thread plans and breakpoints in case we still need to resume to complete
killing the process. If the target was exited or detached, it's
pointless but harmless to do this. But if the state is eStateInvalid -
for instance if we tried to interrupt the target to Halt it and that
fails - we don't want to keep trying to interact with the inferior,
so we shouldn't do this work.
This change explicitly checks eStateStopped, and only does the pre-resume
cleanup if we did manage to stop the process.
Artem Belevich [Mon, 19 Jul 2021 21:27:41 +0000 (14:27 -0700)]
Revert "[MemCpyOpt] Enable memcpy optimizations unconditionally."
This reverts commit
2c98298a7559dfe4a264ef1adaad0921526768cc which breaks
sanitizers.
thomasraoux [Mon, 19 Jul 2021 21:00:51 +0000 (14:00 -0700)]
[mlir] Fix bazel build
Differential Revision: https://reviews.llvm.org/D106311
Derek Schuff [Wed, 2 Jun 2021 21:37:22 +0000 (14:37 -0700)]
[WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections
Debug info sections need R_WASM_FUNCTION_OFFSET_I32 relocs (with FK_Data_4 fixup
kinds) to refer to functions (instead of R_WASM_TABLE_INDEX as is used in data
sections). Usually this is done in a convoluted way, with unnamed temp data
symbols which target the start of the function, in which case
WasmObjectWriter::recordRelocation converts it to use the section symbol
instead. However in some cases the function can actually be undefined; in this
case the dwarf generator uses the function symbol (a named undefined function
symbol) instead. In that case the section-symbol transform doesn't work and we
need to generate the correct reloc type a different way. In this change
WebAssemblyWasmObjectWriter::getRelocType takes the fixup section type into
account to choose the correct reloc type.
Fixes PR50408
Differential Revision: https://reviews.llvm.org/D103557
Mircea Trofin [Wed, 14 Jul 2021 22:03:14 +0000 (15:03 -0700)]
[MLGO] Use binary protobufs for improved training performance.
It turns out that during training, the time required to parse the
textual protobuf of a training log is about the same as the time it
takes to compile the module generating that log. Using binary protobufs
instead elides that cost almost completely.
Differential Revision: https://reviews.llvm.org/D106157
Nick Fitzgerald [Mon, 19 Jul 2021 20:02:46 +0000 (13:02 -0700)]
[WebAssembly] Deduplicate imports of the same module name, field name, and type
When two symbols import the same thing, only one import should be emitted in the Wasm file.
Fixes https://bugs.llvm.org/show_bug.cgi?id=50938
Reviewed By: sbc100
Differential Revision: https://reviews.llvm.org/D105519
Leonard Grey [Mon, 19 Jul 2021 20:44:15 +0000 (16:44 -0400)]
[lld/mac] Add test for --lto-O
This belongs to
fe08e9c4871, I (thakis) forgot to `git add` it back then.
Differential Revision: https://reviews.llvm.org/D105223
thomasraoux [Tue, 13 Jul 2021 03:49:21 +0000 (20:49 -0700)]
[mlir] Add software pipelining transformation for scf.For op
This is the first step to support software pipeline for scf.for loops.
This is only the transformation to create pipelined kernel and
prologue/epilogue.
The scheduling needs to be given by user as many different algorithm
and heuristic could be applied.
This currently doesn't handle loop arguments, this will be added in a
follow up patch.
Differential Revision: https://reviews.llvm.org/D105868
Nico Weber [Mon, 19 Jul 2021 18:38:15 +0000 (14:38 -0400)]
[lld/mac] Resolve defined symbols before undefined symbols
Ports https://reviews.llvm.org/D95985 to the MachO port.
Happens to fix PR51135; see that bug for details.
Also makes lld's behavior match ld64 for the included test case.
Differential Revision: https://reviews.llvm.org/D106293
owenca [Thu, 15 Jul 2021 23:16:49 +0000 (16:16 -0700)]
[clang-format] Break an unwrapped line at a K&R C parameter decl
Break an unwrapped line before the first parameter declaration in a
K&R C function definition.
This fixes PR51074.
Differential Revision: https://reviews.llvm.org/D106112
Stuart Brady [Mon, 7 Jun 2021 15:30:22 +0000 (16:30 +0100)]
[demangler] Fix demangling of 'half'
Demangle 'Dh' as 'half' (as per GCC), and not 'decimal16' (which doesn't
make sense, as there is no IEEE 754 decimal16 format).
The Itanium C++ ABI specification describes 'Dh' as:
> IEEE 754r half-precision floating point (16 bits)
(https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-builtin)
Reviewed By: ldionne, jyknight
Differential Revision: https://reviews.llvm.org/D103833
Teresa Johnson [Mon, 19 Jul 2021 19:35:45 +0000 (12:35 -0700)]
[LangRef] Clarify support for multiple metadata attachments with same id
As discussed on D105251, currently the compiler does not support
multiple metadata attachments on instructions having the same
identifier, whereas it does for global objects. Note this in the
Language Reference manual for clarity.
See D105251 for discussions of history behind this divergence, and the
complexities and possible approaches of adding this support to
instructions in the future.
Differential Revision: https://reviews.llvm.org/D106304
Tony Tye [Mon, 19 Jul 2021 02:21:11 +0000 (02:21 +0000)]
[AMDGPU] Reserve AMDGPU ELF e_flags machine 0x45
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D106249
MaheshRavishankar [Mon, 19 Jul 2021 19:50:30 +0000 (12:50 -0700)]
[mlir][Linalg] NFC: Rename FusionOfTensors pass to FusionOfElementwiseOps pass.
This makes it more explicit what the scope of this pass is. The name
of this pass predates fusion on tensors using tile + fuse, and hence
the confusion.
Differential Revision: https://reviews.llvm.org/D106132
LLVM GN Syncbot [Mon, 19 Jul 2021 19:24:16 +0000 (19:24 +0000)]
[gn build] Port
54902e00d128
Petr Hosek [Thu, 8 Jul 2021 20:44:05 +0000 (13:44 -0700)]
[InstrProfiling] Use weak alias for bias variable
We need the compiler generated variable to override the weak symbol of
the same name inside the profile runtime, but using LinkOnceODRLinkage
results in weak symbol being emitted in which case the symbol selected
by the linker is going to depend on the order of inputs which can be
fragile.
This change replaces the use of weak definition inside the runtime with
a weak alias. We place the compiler generated symbol inside a COMDAT
group so dead definition can be garbage collected by the linker.
We also disable the use of runtime counter relocation on Darwin since
Mach-O doesn't support weak external references, but Darwin already uses
a different continous mode that relies on overmapping so runtime counter
relocation isn't needed there.
Differential Revision: https://reviews.llvm.org/D105176
Artem Belevich [Thu, 15 Jul 2021 20:39:47 +0000 (13:39 -0700)]
[infer-address-spaces] Handle complex non-pointer constexpr arguments.
Fixes https://bugs.llvm.org/show_bug.cgi?id=51099
Differential Revision: https://reviews.llvm.org/D106098
Simon Pilgrim [Mon, 19 Jul 2021 18:28:42 +0000 (19:28 +0100)]
[SLP][X86] Add dot product tests based off PR51075
Nico Weber [Sat, 17 Jul 2021 15:18:48 +0000 (11:18 -0400)]
[lld/mac] Change load command order to be more like ld64
No meaningful behavior change. Makes diffing `otool -l` output a bit easier.
Differential Revision: https://reviews.llvm.org/D106219
Haowei Wu [Mon, 19 Jul 2021 18:59:04 +0000 (11:59 -0700)]
[ifs] Fix linking errors on some llvm builders
This change fixes linking errors on some llvm builders.
Artem Belevich [Wed, 30 Jun 2021 22:36:14 +0000 (15:36 -0700)]
[MemCpyOpt] Enable memcpy optimizations unconditionally.
The patch does not depend on the availability of the library functions for
memcpy/memset as it operates on LLVM intrinsics. The optimizations are useful
on the targets that have these functions disabled (e.g. NVPTX & AMDGPU).
Differential Revision: https://reviews.llvm.org/D104801
Geoffrey Martin-Noble [Mon, 19 Jul 2021 18:48:52 +0000 (11:48 -0700)]
[Bazel] Update for
6103fdfab4
Update Bazel config for
https://github.com/llvm/llvm-project/commit/
6103fdfab4
by deleting the llvm-elfabi target.
Differential Revision: https://reviews.llvm.org/D106295
David Carlier [Mon, 19 Jul 2021 18:46:35 +0000 (19:46 +0100)]
[Sanitizer] Intercepts flopen/flopenat on FreeBSD.
Reviewers: vitalybuka
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D106218
Louis Dionne [Mon, 19 Jul 2021 15:23:09 +0000 (11:23 -0400)]
[libc++] Disable #pragma system_header in the new testing configuration
The new testing configuration did not turn off #pragma system_header,
which means we were not seeing warnings in system headers.
Differential Revision: https://reviews.llvm.org/D106187
LLVM GN Syncbot [Mon, 19 Jul 2021 18:24:11 +0000 (18:24 +0000)]
[gn build] Port
8b4acb067fd3
LLVM GN Syncbot [Mon, 19 Jul 2021 18:24:10 +0000 (18:24 +0000)]
[gn build] Port
61fa9afe4c5b
LLVM GN Syncbot [Mon, 19 Jul 2021 18:24:09 +0000 (18:24 +0000)]
[gn build] Port
6103fdfab4e2
Haowei Wu [Fri, 2 Apr 2021 03:55:11 +0000 (20:55 -0700)]
[ifs][elfabi] Merge llvm-ifs/elfabi tools
This change merges llvm-elfabi and llvm-ifs tools.
Differential Revision: https://reviews.llvm.org/D100139
Haowei Wu [Wed, 7 Apr 2021 22:50:12 +0000 (15:50 -0700)]
[ifs] Prepare llvm-ifs for elfabi/ifs merging.
This diff changes llvm-ifs to use unified IFS file format
and perform other renaming changes in preparation for the
merging between elfabi/ifs.
Differential Revision: https://reviews.llvm.org/D99810
Haowei Wu [Wed, 31 Mar 2021 23:48:56 +0000 (16:48 -0700)]
[elfabi] Prepare elfabi/ifs merging.
This change implements unified text stub format and command line
interface proposed in the elfabi/ifs merge plan.
Differential Revision: https://reviews.llvm.org/D99399
Jonas Paulsson [Fri, 16 Jul 2021 09:23:46 +0000 (11:23 +0200)]
[SystemZ] Handle NoRegister in SystemZTargetLowering::emitMemMemWrapper().
Bugfix: The compiler should be able to generate a memset to nullptr.
Review: Ulrich Weigand
Amy Huang [Mon, 19 Jul 2021 17:42:28 +0000 (10:42 -0700)]
Revert "[llvm][sve] Lowering for VLS truncating stores" because it
causes a seg fault (see https://reviews.llvm.org/D104471).
This reverts commit
c305557acdaad453e32309d575fe9c6c7090c099.
Eli Friedman [Mon, 19 Jul 2021 18:00:01 +0000 (11:00 -0700)]
[NFC] Run -instnamer on test Transforms/LICM/sink-debuginfo-preserve.ll
Rob Suderman [Mon, 19 Jul 2021 17:31:02 +0000 (10:31 -0700)]
[mlir][tosa] Added shape inference for tosa convolution operations
Added shape inference handles cases for convolution operations. This includes
conv2d, conv3d, depthwise_conv2d, and transpose_conv2d. With transpose conv
we use the specified output shape when possible however will shape propagate
if the output shape attribute has dynamic values.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D105645
Amara Emerson [Mon, 19 Jul 2021 06:34:09 +0000 (23:34 -0700)]
[GlobalISel] Fix load-or combine moving loads across potential aliasing stores.
Although this combine checks that there's no load folding barriers between
the loads that it's trying to merge, it was inserting the load at the
MIRBuilder's default insertion point, which is the G_OR use inst.
This was causing a miscompile in the test suite's
SingleSource/Regression/C/gcc-c-torture/execute/GCC-C-execute-bswap-2
Differential Revision: https://reviews.llvm.org/D106251
Wouter van Oortmerssen [Thu, 15 Jul 2021 20:24:28 +0000 (13:24 -0700)]
[WebAssembly] Support R_WASM_MEMORY_ADDR_TLS_SLEB64 for wasm64
Also fixed TLS tests swapping addr & value in store op
Differential Revision: https://reviews.llvm.org/D106096
Craig Topper [Mon, 19 Jul 2021 15:31:16 +0000 (08:31 -0700)]
[SelectionDAG][RISCV] Use isSExtCheaperThanZExt to control whether sext or zext is used for constant folding any_extend.
RISCV would prefer a sign extended constant since that works better
with our constant materialization. We have an existing TLI hook we
use to control sign extension of setcc operands in type legalization.
That hook happens to do the right check we need here, but might be
straying from its original purpose. With only RISCV defining this
hook in tree, I wasn't sure if it was worth adding another hook
with identical behavior.
This is an alternative to D105785 where I tried to handle this in
the RISCV backend by not creating ANY_EXTENDs in some places.
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D105918
Hanhan Wang [Mon, 19 Jul 2021 16:23:55 +0000 (09:23 -0700)]
[mlir][Linalg] Migrate 2D pooling ops from tc definition to yaml definition.
This deletes all the pooling ops in LinalgNamedStructuredOpsSpec.tc. All the
uses are replaced with the yaml pooling ops.
Reviewed By: gysit, rsuderman
Differential Revision: https://reviews.llvm.org/D106181
Victor Campos [Fri, 16 Jul 2021 13:16:36 +0000 (14:16 +0100)]
[NewPM] Fix wrong perfect forwardings
Some template functions were missing '&&' in function arguments,
therefore these were always taken by value after template instantiation.
This patch adds the double ampersand to introduce proper perfect
forwarding.
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D106148
Amy Kwan [Mon, 19 Jul 2021 16:20:09 +0000 (11:20 -0500)]
[NFC][PowerPC] Update builtins-ppc-altivec.c to be run under `-faltivec-src-compat=mixed`
This patch adds the `-faltivec-src-compat=mixed` option to the
`builtins-ppc-altivec.c` test.
Currently, the default for `-faltivec-src-compat` is `mixed`. The reason we
explicitly specify `mixed` to the RUN lines of this test is because eventually,
the default will set to `xl`.
Having the default as `xl` changes the CHECKs of this test slightly, as it
reorders some of the `vector bool` and `vector pixel` CHECKs (since under the
`xl` option, `vector bool` and `vector pixel` are treated in the same way as
other vector scalars). Explicitly specifying `mixed` ensures that we are testing
pre-existing Clang behaviour.
Differential Revision: https://reviews.llvm.org/D106282
Simon Pilgrim [Mon, 19 Jul 2021 16:14:21 +0000 (17:14 +0100)]
[ISD] Add disclaimer comments to AssertSext/Zext/Align opcodes about poison values
As encountered on D106053, we need to be very explicit that the Assertion nodes don't hold true for a poison value (or for specific poisoned vector elements).
Differential Revision: https://reviews.llvm.org/D106257
Simon Pilgrim [Mon, 19 Jul 2021 15:35:26 +0000 (16:35 +0100)]
[X86] Fix case of IsAfterLegalize argument. NFC.
Pulled out of D106280
Tobias Gysi [Mon, 19 Jul 2021 15:36:53 +0000 (15:36 +0000)]
[mlir][linalg] Fold TensorCast into PadTensorOp.
Add pattern to fold a TensorCast into a PadTensorOp if the cast removes static size information.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D106278
Matt Arsenault [Fri, 16 Jul 2021 16:55:41 +0000 (12:55 -0400)]
GlobalISel: Preserve memory types for implicit sret load/stores
David Green [Mon, 19 Jul 2021 15:36:33 +0000 (16:36 +0100)]
[ARM] Remove PromotedBitwiseVT for NEON types
This removes the promotion of NEON AND, OR and XOR nodes to v2i32/v4i32,
treating them the same as the AArch64 and MVE backends where we just add
the relevant patterns for each legal type. This prevents a lot of
bitcasts from being added to the DAG, which have the potential to make
optimizations more difficult. It does mean adding extra patterns, and
some codegen can change due to the types now being legal, not promoted.
Differential Revision: https://reviews.llvm.org/D105588
maekawatoshiki [Mon, 19 Jul 2021 15:31:18 +0000 (00:31 +0900)]
[LICM] Create LoopNest Invariant Code Motion (LNICM) pass
This patch adds a new pass called LNICM which is a LoopNest version of LICM and a test case to show how LNICM works.
Basically, LNICM only hoists invariants out of loop nest (not a loop) to keep/make perfect loop nest. This enables later optimizations that require perfect loop nest.
Reviewed By: Whitney
Differential Revision: https://reviews.llvm.org/D104180
Matt Arsenault [Thu, 10 Jun 2021 23:32:41 +0000 (19:32 -0400)]
GlobalISel: Preserve LLT when bitcasting loads and stores
This also avoids improperly legalizing some truncating vector stores.
Riccardo Mori [Mon, 19 Jul 2021 15:06:21 +0000 (17:06 +0200)]
[Polly][Isl] Stop using isl::set::lex_le_set. NFC
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.
Changes made:
- Stop using `isl::set::lex_le_set`. The official way to do this is to use `isl::map::lex_le_at`
- Removed `isl::set::lex_le_set` from `isl-noexceptions.h`
- `isl-noexceptions.h` has been generated by this https://github.com/patacca/isl/commit/
266fea1d3dbd31c23d866eb363fcc8e61e50419f
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D106269
peter klausler [Fri, 16 Jul 2021 17:42:17 +0000 (10:42 -0700)]
[flang] Runtime API for data pointers
Define and implement an API for use by lowering to
implement operations on pointers.
Differential Revision: https://reviews.llvm.org/D106170
Dmitry Vyukov [Mon, 19 Jul 2021 13:51:08 +0000 (15:51 +0200)]
tsan: remove duplicate arch switch in buildgo.sh
For some reason we have 2 switches on arch and add
half of arch flags in one place and half in another.
Merge these 2 switches.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D106274
Hsiangkai Wang [Mon, 28 Jun 2021 05:38:41 +0000 (13:38 +0800)]
[Clang][RISCV] Support half-precision floating point for RVV intrinsics.
Use _Float16 as the half-precision floating point type. Define a new
type specifier 'x' for the _Float16 type.
Differential Revision: https://reviews.llvm.org/D105001
Matt Arsenault [Fri, 16 Jul 2021 15:10:41 +0000 (11:10 -0400)]
AArch64/GlobalISel: Cleanup unnecessary size checks in call lowering
The CCValAssign types should now be accurate, so these are no longer
necessary.
Giorgis Georgakoudis [Mon, 19 Jul 2021 14:54:26 +0000 (07:54 -0700)]
Revert "[OpenMP] Codegen aggregate for outlined function captures"
This reverts commit
e9c7291cb25f071f1a1dfa4049ed9f5a8a217b3e.
Fix failing tests
Amy Kwan [Mon, 19 Jul 2021 13:20:06 +0000 (08:20 -0500)]
[PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl
This patch implements the initialization of vectors under the
-faltivec-src-compat=xl option introduced in https://reviews.llvm.org/D103615.
Under this option, the initialization of scalar vectors, vector bool, and vector
pixel are treated the same, where the initialization value is splatted across
the whole vector.
This patch does not change the behaviour of the -faltivec-src-compat=mixed option,
which is the current default for Clang.
Differential Revision: https://reviews.llvm.org/D106120
Jeremy Morse [Mon, 19 Jul 2021 13:57:34 +0000 (14:57 +0100)]
[InstrRef][X86] Drop debug instruction numbers from x87 instructions
Avoid a crash when using instruction referencing if x87 floating point
instructions are used. These instructions are significantly mutated when
they're rewritten from referring to registers, to referring to
floating-point-stack positions. As a result, their operands are re-ordered,
and (InstrRef) LiveDebugValues asserts when it sees a DBG_INSTR_REF
referring to a non-reg non-def register operand.
To fix this, drop the instruction numbers, and thus variable locations.
This patch adds a helper utility do do that.
Dropping the variable locations is sub-optimal, but applying DBG_VALUEs to
the $fp0 and similar registers is dropped on emission too. It seems we've
never done well at describing variables that live in x87 registers, at all.
Differential Revision: https://reviews.llvm.org/D105657
Jamie Schmeiser [Mon, 19 Jul 2021 14:03:22 +0000 (10:03 -0400)]
thread_local support for AIX
Summary:
The AIX linker will produce errors on unresolved weak symbols. Change the
generated code to not check for the initialization function but just call
it and ensure that it always exists. Also, the AIX atexit routine has a
different name (and signature) so call it correctly. Update the lit tests
to test on AIX appropriately.
Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: hubert.reinterpretcast (Hubert Tong)
Differential Revision: https://reviews.llvm.org/D104420
Kazu Hirata [Mon, 19 Jul 2021 13:56:04 +0000 (06:56 -0700)]
[CodeGen] Remove isNON_TRUNCStore and isTRUNCStore (NFC)
The last use of isNON_TRUNCStore was removed on Oct 10, 2018 in commit
07acc992dc39edfccc5a4b773c3dcf8a5bf6d893.
isTRUNCStore seems to be unused for at least 10 years.
Roman Lebedev [Mon, 19 Jul 2021 13:39:37 +0000 (16:39 +0300)]
[TLI] prepareSREMEqFold(): use correct VT for the final VSELECT (PR51133)
We were using the wrong VT for this final VSELECT,
it should be in the final comparison VT,
not the source value's VT.
Fixes https://bugs.llvm.org/show_bug.cgi?id=51133
Arjun P [Mon, 19 Jul 2021 12:45:49 +0000 (18:15 +0530)]
[MLIR] AffineStructures: resolve clang-tidy warnings [NFC]
Elton [Mon, 19 Jul 2021 13:14:23 +0000 (15:14 +0200)]
Fix duplicate checks in clangd comments
This patch removes a duplicate checks in the top-level comments in `clang-tools-extra/clangd/ParsedAST.h`
Reviewed By: kadircet
Differential Revision: https://reviews.llvm.org/D106227
Jay Foad [Mon, 19 Jul 2021 12:39:30 +0000 (13:39 +0100)]
[AMDGPU] Fix typo in comments idexen -> idxen
Simon Tatham [Mon, 19 Jul 2021 10:45:46 +0000 (11:45 +0100)]
[clang] Change set type used for SourceLocation.
This is part of a patch series working towards the ability to make
SourceLocation into a 64-bit type to handle larger translation units.
If clang is built for a 32-bit platform and SourceLocation is 64 bits
wide, then a SourceLocation will be larger than a pointer, so it won't
be possible to keep them in a SmallPtrSet any more. Switch to
SmallDenseSet instead.
Patch originally by Mikhail Maltsev.
Differential Revision: https://reviews.llvm.org/D105493
Alexander Belyaev [Mon, 19 Jul 2021 12:18:35 +0000 (14:18 +0200)]
Revert "[mlir] Introduce `linalg.tiled_yield` terminator for `linalg.tiled_loop`."
This reverts commit
3b03d9b874aa902f7f969e7ffdefde23c2758eeb.
Ian Campbell [Mon, 19 Jul 2021 12:17:23 +0000 (14:17 +0200)]
[clang-tidy] ensure run-clang-tidy reports children killed by signals
If a clang-tidy child process exits with a signal then run-clang-tidy will exit
with an error but there is no hint why in the output, since the clang-tidy
doesn't log anything and may not even have had the opportunity to do so
depending on the signal used.
`subprocess.CompletedProcess.returncode` is the negative signal number in this
case.
I hit this in a CI system where the parallelism used exceeded the RAM assigned
to the container causing the OOM killer to SIGKILL clang-tidy processes.
Reviewed By: sylvestre.ledru
Differential Revision: https://reviews.llvm.org/D99081
Alexander Belyaev [Mon, 19 Jul 2021 12:17:13 +0000 (14:17 +0200)]
[rt][nfc] Rewrite #ifndef as #if defined().
Alexander Belyaev [Mon, 19 Jul 2021 10:57:36 +0000 (12:57 +0200)]
[mlir] Introduce `linalg.tiled_yield` terminator for `linalg.tiled_loop`.
https://llvm.discourse.group/t/rfc-changes-to-linalg-tiledloopop-to-unblock-reductions/3890
Differential Revision: https://reviews.llvm.org/D106066
Lang Hames [Mon, 19 Jul 2021 11:52:14 +0000 (21:52 +1000)]
[ORC-RT] Introduce a weak-import macro.
This should eliminate warnings about ignored weak_import attributes on some of
the bots, e.g. https://lab.llvm.org/buildbot/#/builders/165/builds/3770/.
Lang Hames [Mon, 19 Jul 2021 11:21:40 +0000 (21:21 +1000)]
[ORC-RT] Separate jit-dispach tag decls from definitions.
This should eliminate the "initialized and declared 'extern'" warnings produced
on some bots, e.g. https://lab.llvm.org/buildbot/#/builders/165/builds/3770
Simon Pilgrim [Mon, 19 Jul 2021 12:01:12 +0000 (13:01 +0100)]
[CostModel][X86] Add fast math tests for float reductions
As noticed on D105432 we didn't have any coverage to distinguish between fast/exact float reductions
Alexey Bataev [Mon, 19 Jul 2021 11:18:27 +0000 (04:18 -0700)]
[SLP]Fix possible crash on unreachable incoming values sorting.
The incoming values for PHI nodes may come from unreachable BasicBlocks,
need to handle this case.
Differential Revision: https://reviews.llvm.org/D106264
Mindong Chen [Mon, 19 Jul 2021 11:24:38 +0000 (19:24 +0800)]
[LoopUtils] Fix incorrect RT check bounds of loop-invariant mem accesses
This fixes the lower and upper bound calculation of a
RuntimeCheckingPtrGroup when it has more than one loop
invariant pointers. Resolves PR50686.
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D104148