Commit Graph

421515 Commits

Author SHA1 Message Date
Max Kazantsev 57d17795b9 [Test] Add one more test for patch [SLP]Improve reductions analysis and emission, part 1.
The original patch leads to malformed phis on this test. Make sure
we're safeguarded from its return until it is fixed.
2022-04-20 13:57:26 +07:00
Douglas Yung c952754206 Make tests slightly more flexible for platforms which emit arguments in between some of the expected arguments. 2022-04-19 23:25:22 -07:00
Fangrui Song bec8dff33e [AMDGPU] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds 2022-04-19 22:36:58 -07:00
Fangrui Song fb193db2c7 [PowerPC] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds 2022-04-19 22:35:05 -07:00
Fangrui Song 14d9390721 Revert D123198 "[BuildLibCalls] Introduce getOrInsertLibFunc() for use when building libcalls."
test/Transforms/InstCombine/pr39177.ll failed in a -DLLVM_USE_SANITIZER=Undefined build.
```
lib/Transforms/Utils/BuildLibCalls.cpp:1217:17: runtime error: reference binding to null pointer of type 'llvm::Function'
```
`Function &F = *M->getFunction(Name);`

This reverts commit 0f8c626723.
2022-04-19 22:26:10 -07:00
LLVM GN Syncbot f493fe34bf [gn build] Port 6c69427e88 2022-04-20 04:12:02 +00:00
Nico Weber 9973075274 [gn build] port clang-linker-wrapper build file
Tests now try to run it, so we need a build file for it.
2022-04-20 00:11:34 -04:00
Richard 08881c2de6 [clang-tidy] Improve macro handling in modernize-macro-to-enum
When a macro is undef'ed or used in a preprocessor conditional
expression, we need to remember that macro should it later be
defined in the file to an integral value.  We need to exclude
such macro names from being turned into an enum.

Maintain a blacklist of identifiers that we've seen in an
undef or conditional preprocessor directive.  When the file is
done processing, remove all the blacklisted identifiers from
conversion to an enum.

Differential Revision: https://reviews.llvm.org/D123889

Fixes #54842
2022-04-19 21:28:17 -06:00
jacquesguan 61baf2ffa7 [mlir][Vector] Add check of supported reduction kind for ScanOp.
This patch adds check of supported reduction kind for ScanOp to avoid using and/or/xor for floating point type.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D123977
2022-04-20 02:42:19 +00:00
Matt Arsenault 752c9122a6 TargetRegistry: Don't add "error" to error messages
Many of the users of this add their own "error:" to the start,
resulting in error: error.
2022-04-19 22:29:16 -04:00
Matt Arsenault 1900b6c77b AMDGPU: Add assert for GDS globals 2022-04-19 22:28:11 -04:00
Petr Hosek af21445ea8 [CMake][Fuchsia] Include find-all-symbols in the distribution
This is needed to use clang-include-fixer.

Differential Revision: https://reviews.llvm.org/D124053
2022-04-19 19:27:46 -07:00
Matt Arsenault 987df725ac AMDGPU: Serialize VGPRForAGPRCopy 2022-04-19 22:14:52 -04:00
Matt Arsenault b5ec131267 AMDGPU: Fix allocating GDS globals to LDS offsets
These don't seem to be very well used or tested, but try to make the
behavior a bit more consistent with LDS globals.

I'm not sure what the definition for amdgpu-gds-size is supposed to
mean. For now I assumed it's allocating a static size at the beginning
of the allocation, and any known globals are allocated after it.
2022-04-19 22:14:48 -04:00
Matt Arsenault 378bb8014d AMDGPU: Serialize a few more MachineFunctionInfo fields in MIR 2022-04-19 22:12:59 -04:00
Matt Arsenault f90f4884c8 AMDGPU: Serialize gds size in MIR 2022-04-19 22:12:59 -04:00
jacquesguan 590a38920f [mlir][LLVMIR] Add vector predication type cast intrinsic ops.
This patch adds vector predication type cast intrinsic ops.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D123996
2022-04-20 02:11:14 +00:00
Matt Arsenault 5cd17f9d43 AMDGPU: Serialize WWM registers 2022-04-19 21:44:43 -04:00
Matt Arsenault 9592e88f59 MachineModuleInfo: Don't allow dynamically setting DbgInfoAvailable
This can be set up front, and used only as a cache. This avoids a
field that looks like it requires MIR serialization.

I believe this fixes 2 bugs for CodeView. First, this addresses a
FIXME that the flag -diable-debug-info-print only works with
DWARF. Second, it fixes emitting debug info with emissionKind NoDebug.
2022-04-19 21:08:37 -04:00
Matt Arsenault 9a519179d9 ValueMap: Fix typo 2022-04-19 21:07:54 -04:00
Matt Arsenault 209e7ef874 X86: Do not use ValueMap for PreallocatedIds
ValueMap should only be necessary if the IR values can be
replaced. This is only used during codegen, when it's illegal to
change the underlying IR. This allows using the default copy
constructor for X86MachineFunctionInfo.

I'm not happy about targets keeping state here that's only used in one
specific pass, but we don't have a better place to put it right now.
2022-04-19 21:07:47 -04:00
Matt Arsenault e0d585d75a AMDGPU: Defer creation of WWM VGPR spill slots
There's no reason to create these immediately. They can be created in
the prolog/epilog code like CSR spills. There's probably a cleaner way
to do this by utilizing the CSR spill code.

This makes the frame index used transient state for
PrologEpilogInserter, and thus makes serialization easier. Really this
doesn't need to be saved here but there isn't really a better place
for it.
2022-04-19 21:07:13 -04:00
Matt Arsenault 53f3f2bbb1 AArch64: Use Register 2022-04-19 21:07:04 -04:00
Matt Arsenault 4271ae22be AMDGPU: Remove some unreachable code in WWM pass
Defs must be registers and there's no point to code after
llvm_unreachable.
2022-04-19 21:04:33 -04:00
Matt Arsenault bc7902f148 AMDGPU: Remove unused MachineFunctionInfo fields
These were leftovers from a half-implement spill to LDS attempt.
2022-04-19 21:04:33 -04:00
Matt Arsenault 8591328e15 Intrinsics: Mark llvm.eh.sjlj.callsite argument as immarg
The assert in SelectionDAG implies that it is
2022-04-19 21:04:33 -04:00
Matt Arsenault d16945d31b AArch64/GlobalISel: Add -global-isel-abort=1 to select tests
Otherwise the legalizer verifier error isn't triggered since the
default is fallback.
2022-04-19 21:04:32 -04:00
Matt Arsenault 507259820a GlobalISel: Add LegalizeMutations to help use More/FewerElements 2022-04-19 21:04:32 -04:00
Matt Arsenault d6457ec04a AArch64/GlobalISel: Reduce use of getMinClassForRegBank
getMinClassForRegBank and getRegClassForTypeOnBank were basically
identical functions with different APIs. Consolidate on the version
that uses LLT instead of a bitwidth, since that would be more
appropriate to use in a generic API. Keep getMinClassForRegBank around
for now, since copies are a special case that can't simply read the
type from the register operands.
2022-04-19 21:04:32 -04:00
Matt Arsenault 12d79b1514 GlobalISel: Add LLT helper to multiply vector sizes 2022-04-19 21:04:32 -04:00
Matt Arsenault e38c5fded6 AArch64/GlobalISel: Remove some null checks for getVRegDef
getVRegDef is not allowed to fail for generic virtual registers, so
there's not much point in checking it.
2022-04-19 21:04:32 -04:00
Matt Arsenault 96c9190761 AArch64/GlobalISel: Remove asserts on copy instructions
These things are checked in the verifier already, so there's not much
point in re-asserting them here. They aren't directly verified for the
copy-like extension artifacts, but the incorrect output copies would
be caught on the other side.
2022-04-19 21:04:32 -04:00
Fangrui Song c129220eaa [lldb/gdb-remote] Fix -Wswitch after D116462 2022-04-19 18:01:06 -07:00
Mehdi Amini 8608ed1441 Apply clang-tidy fixes for llvm-twine-local in OpenMPToLLVMIRTranslation.cpp (NFC) 2022-04-20 00:39:10 +00:00
Fangrui Song a57d16bf80 [CodeGen] Fix -Wswitch after D116462 2022-04-19 17:33:15 -07:00
Fangrui Song 8b0e7f2293 [CodeGen] Fix -Wswitch after D116462 2022-04-19 17:28:54 -07:00
Andrew Browne 204c12eef9 [DFSan] Print an error before calling null extern_weak functions, incase dfsan instrumentation optimized out a null check.
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D124051
2022-04-19 17:01:41 -07:00
Vitaly Buka 700442dee3 [msan] Destroy ConstantTokenNone before types above
~ConstantTokenNone access them, so it should be destroyed first.
2022-04-19 16:57:32 -07:00
Vitaly Buka 33c5d8f939 [msan] Disable assert with msan
The assert uses data from just destroyed BasicBlock.
2022-04-19 16:42:05 -07:00
Vitaly Buka 0d0a99cb96 [msan] Advance before destroying entry
-fsanitize-memory-use-after-dtor reports this memory access.
2022-04-19 16:42:04 -07:00
Ilia Diachkov 153dee34f1 [SPIR-V](6/6) Add the module analysis pass and the simplest tests
This patch adds one SPIRV analysis pass and extends AsmPrinter. It is
essential for minimum SPIR-V output. Also it adds several simplest tests
to show that the target basically works.

Differential Revision: https://reviews.llvm.org/D116465

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-04-20 01:10:25 +02:00
Ilia Diachkov eab7d3639b [SPIR-V](5/6) Add LegalizerInfo, InstructionSelector and utilities
The patch adds SPIRVLegalizerInfo, SPIRVInstructionSelector and
SPIRV-specific utilities.

Differential Revision: https://reviews.llvm.org/D116464

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-04-20 01:10:25 +02:00
Ilia Diachkov ec2590362e [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter
The patch contains target lowering for SPIRV. Also it implements
TargetMachine and AsmPrinter.

Differential Revision: https://reviews.llvm.org/D116463

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-04-20 01:10:25 +02:00
Ilia Diachkov 6c69427e88 [SPIR-V](3/6) Add MC layer, object file support, and InstPrinter
The patch adds SPIRV-specific MC layer implementation, SPIRV object
file support and SPIRVInstPrinter.

Differential Revision: https://reviews.llvm.org/D116462

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-04-20 01:10:25 +02:00
Ilia Diachkov 40114dd5bf [SPIR-V](2/6) Add SPIRV target description files
Differential Revision: https://reviews.llvm.org/D115786

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-04-20 01:10:25 +02:00
Ilia Diachkov 7fd4622d48 [SPIR-V](1/6) Add stub for SPIRV backend
This patch contains enough for lib/Target/SPIRV to compile: a basic
SPIRVTargetMachine and SPIRVTargetInfo.

Differential Revision: https://reviews.llvm.org/D115009

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-04-20 01:10:25 +02:00
Nicolai Hähnle b39d34de5e AMDGPU: More mad_64_32 test cases for multiple uses
Also use gfx90a for the gfx9 test, whose code gen should be affected by
faster multiply-add instructions.
2022-04-19 18:00:05 -05:00
Paul Robinson 20c873c12f [PS5] Avoid a driver crash
In some cases, an error constructing a compiler or assembler job could
leave the Inputs in a state that the code for constructing the linker
job was not ready for.
2022-04-19 15:55:32 -07:00
Joseph Huber 8c64928887 [OpenMP] Add necessary registered targets for linker wrapper test
Summary:
The linker wrapper needs to use the registered backend to perform LTO.
This was causing problems on the buildbots that didn't support it.
2022-04-19 18:48:58 -04:00
Joseph Huber dbb10f7097 [OpenMP] Fix deleted move constructor failing on some compiles
Summary:
A previous commit added some new errors that were not correctly casted
to an r-value. This doesn't work on some compilers.
2022-04-19 18:40:15 -04:00