Commit Graph

426434 Commits

Author SHA1 Message Date
Fangrui Song 6c8b173b4a [SanitizerCoverage][test] Remove br i1 undef to avoid UB 2022-06-10 20:40:34 -07:00
Fangrui Song 3d6872b09f [GlobalOpt][test] Remove br i1 undef 2022-06-10 20:36:22 -07:00
PeixinQiao b826d551fc [NFC] Move flang OpenMP semantic tests under one single directory
To be consistent with OpenACC and will find the tests in one single
directory for OpenMP.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D127529
2022-06-11 10:46:42 +08:00
Fangrui Song 62b3d8d10a [TableGen] const char *const x => const char x[] 2022-06-10 19:13:59 -07:00
Vitaly Buka 665617182c [Bitcode] Don't use UINT_MAX for missing SanitizerMetadata
Looks like comment on D126100 was unnoticed.
2022-06-10 18:20:55 -07:00
Tue Ly ee89927707 [libc] Implement double precision FMA for targets without FMA instructions.
Implement double precision FMA (Fused Multiply-Add) for targets without
FMA instructions using __uint128_t to store the intermediate results.

Reviewed By: michaelrj, sivachandra

Differential Revision: https://reviews.llvm.org/D124495
2022-06-10 20:57:27 -04:00
Arjun P 4e53df0f0b [MLIR][Presburger] PresburgerSet::containsPoint: support disjuncts with locals
Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D127466
2022-06-10 20:18:49 -04:00
Maksim Panchenko d648aa1b8e [BOLT][TEST] Use double dash flags in tests
Replace a single dash with a double dash for options that have more
than a single letter.

llvm-bolt-wrapper.py has special treatment for output options such as
"-o" and "-w" causing issues when a single dash is used, e.g. for
"-write-dwp". The wrapper can be fixed as well, but using a double dash
has other advantages as well.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D127538
2022-06-10 16:27:33 -07:00
Michael Jones 02f4affe2d [libc] add EXP_MAT_MASK to x87 long double
A previous patch added the constant EXP_MANT_MASK to the FloatProperties
for other types of long double. This patch adds it to the special 80-bit
x87 long double.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D127550
2022-06-10 16:26:29 -07:00
Mircea Trofin 7e7021ca1a [mlgo] Update FunctionPropertyCache after invalidating analyses
The update depends on LoopInfo, so we need that refreshed first, not
after.

Differential Revision: https://reviews.llvm.org/D127467
2022-06-10 16:18:14 -07:00
Huan Nguyen 82095bd5ed [BOLT] Mark fragments related to split jump table as non-simple
Mark fragments related to split jump table as non-simple.

A function could be splitted into hot and cold fragments. A split jump table is
challenging for correctly reconstructing control flow graphs, so it was marked
as ignored. This update marks those fragments as non-simple, allowing them
to be printed and partial control flow graph construction.

Test Plan:
```
llvm-lit -a tools/bolt/test/X86/split-func-icf.s
```
This test has two functions (main, main2), each has a jump table target to the
same cold portion main2.cold.1(*2). We try to print out only this cold portion.
If it is ignored, it cannot be printed. If it is non-simple, it can be printed. We
verify that it can be printed.

Reviewed By: Amir

Differential Revision: https://reviews.llvm.org/D127464
2022-06-10 15:49:32 -07:00
Lei Zhang e90b56e411 [mlir][vulkan] Add missing '<>' in test IRs to fix test 2022-06-10 18:09:12 -04:00
Lei Zhang 11cf2d5f62 [mlir][spirv] Unify aliases of different bitwidth scalar types
This commit extends the UnifyAliasedResourcePass to handle scalar
types of different bitwidths. It requires to get the smaller bitwidth
resource as the canonical resource so that we can avoid subcomponent
load/store. Instead we load/store multiple smaller bitwidth ones.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D127266
2022-06-10 18:01:31 -04:00
Anders Waldenborg ff4abe7552 [scan-build-py] Fix exception on shutdown with sarif-html output format
When running scan-build-py's analyze-build script with output format set
to sarif & html it wants to print a message on how to look at the
defects mentioning the directory name twice.

But the path argument was only given once to the logging function,
causing "TypeError: not enough arguments for format string" exception.

Differential Revision: https://reviews.llvm.org/D126974
2022-06-10 23:21:09 +02:00
Nikolas Klauser 6f27eb6ece [libc++] Use the same implementation of invoke for C++03 and C++11
Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D127489
2022-06-10 23:18:20 +02:00
Mitch Phillips db68a25ca9 Revert "[Attributor] Ensure to use the proper liveness AA"
This reverts commit a3273c0c06.

Reason: Broke the ASan buildbots with a memory leak. See
https://reviews.llvm.org/rG94841c713fdd2bce3276015d1e946d414bb74ee8 for
more information.
2022-06-10 14:05:09 -07:00
Nuno Lopes e5c5f92e12 [InstCombine] switch synthetic unreachable to use undef instead of poison (NFC) 2022-06-10 21:54:09 +01:00
Med Ismail Bennani 5a9fa21ce8 [lldb/crashlog] Show help when the command is called without any argument
This patch changes the `crashlog` command behavior to print the help
message if no argument was provided with the command.

rdar://94576026

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-06-10 13:44:43 -07:00
agostini01 70f1021431 [mlir][py-bindings] Fix include issue introduced by D127352
Using:
      -DMLIR_ENABLE_BINDINGS_PYTHON=ON

Resulted in a failed build due to changes implemented by
https://reviews.llvm.org/D127352

This updates the include line

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D127523
2022-06-10 20:44:22 +00:00
Nikolas Klauser 3cd4531b9b [libc++] Granularize <iterator> includes
Reviewed By: ldionne, #libc

Spies: libcxx-commits, wenlei

Differential Revision: https://reviews.llvm.org/D127445
2022-06-10 22:43:57 +02:00
Nikolas Klauser 42f8f55798 [libc++] Simplify type_traits and use more builtins
Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D127226
2022-06-10 22:41:40 +02:00
Eli Friedman 0ff51d5dde Fix interaction of CFI instructions with MachineOutliner.
1. When checking if a candidate contains a CFI instruction, actually
iterate over all of the instructions, instead of stopping halfway
through.
2. Make sure copied CFI directives refer to the correct instruction.

Fixes https://github.com/llvm/llvm-project/issues/55842

Differential Revision: https://reviews.llvm.org/D126930
2022-06-10 13:37:49 -07:00
Argyrios Kyrtzidis fbaa8b9ae5 [Lex] Fix `fixits` for typo-corrections of preprocessing directives within skipped blocks
The `EndLoc` parameter was always unset so no fixit was emitted. But it is also unnecessary for determining the range so we can remove it.

Differential Revision: https://reviews.llvm.org/D127251
2022-06-10 13:32:19 -07:00
Philip Reames 536095a27c [RISCV] Refine costs for i1 reductions
Our actual lowering for i1 reductions uses ctpop combined with possibly a vector negate and possibly a logic op afterwards. I believe ctpop to be low cost on all reasonable hardware.

The default costing implementation here was returning quite inconsistent costs. and/or were returning very high costs (because we seem to think moving into scalar registers is very expensive?) and others were returning lower but still too high (because of the assumed tree reduce strategy). While we should probably improve the generic costing strategy for i1 vectors, let's start by fixing the immediate problem.

Differential Revision: https://reviews.llvm.org/D127511
2022-06-10 13:21:52 -07:00
Philip Reames f7bb691d61 [RISCV] Implement isElementTypeLegalForScalableVector TTI hook
This brings us into alignment with AArch64, and in the process fixes a compiler crash bug in uniform store handling in the vectorizer.

Before the recent invalid cost bailout work, this would have also avoided crashes on invalid costs in some cases. I honestly think the vectorizer should gracefully bailout on uniform stores it can't use a scatter for, but it doesn't, so lets take the path of least resistance here. It's also possible that there are other vectorizer bugs AArch64 isn't seeing because of this hook; we don't want to be finding them either.

Differential Revision: https://reviews.llvm.org/D127514
2022-06-10 13:20:58 -07:00
Paul Robinson 0fe88f9679 [PS4/PS5] Don't inherit base class alignment 2022-06-10 13:15:17 -07:00
Philip Reames 679aa92d2e [RISCV] Minor test improvements for scalable scatter/gather tests added in 275b2e524 2022-06-10 13:13:49 -07:00
Tue Ly 2a746ebf1a [libc][Obvious] Change all __builtin_clz* calls to clz in builtin_wrappers.h. 2022-06-10 16:03:10 -04:00
Craig Topper 08ea27bf13 [RISCV] Don't require loop simplify form in RISCVGatherScatterLowering.
We need a preheader and a single latch, but we don't need a dedicated
exit.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D127513
2022-06-10 13:00:20 -07:00
Craig Topper a639e1fceb [RISCV] Add test case showing failure to convert gather/scatter to strided load/store. NFC
Our optimization pass checks for loop simplify form, before doing
the transform. The loops here aren't in loop simplify form because
the exit block has two predecessors.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D127451
2022-06-10 13:00:20 -07:00
Philip Reames 275b2e5243 [RISCV] Add cost model coverage for scalable scatter/gather 2022-06-10 12:51:26 -07:00
Mitch Phillips 35b1a64589 Add documentation of new sanitizer-specific GV attributes.
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D126922
2022-06-10 12:46:02 -07:00
Mitch Phillips 8db981d463 Add sanitizer-specific GlobalValue attributes.
Plan is the migrate the global variable metadata for sanitizers, that's
currently carried around generally in the 'llvm.asan.globals' section,
onto the global variable itself.

This patch adds the attribute and plumbs it through the LLVM IR and
bitcode formats, but is a no-op other than that so far.

Reviewed By: vitalybuka, kstoimenov

Differential Revision: https://reviews.llvm.org/D126100
2022-06-10 12:28:18 -07:00
John Ericson 0bb317b7bf Revert "[cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore"
This reverts commit d5daa5c5b0.
2022-06-10 19:26:12 +00:00
Dávid Bolvanský b3b08ad623 [Clang] Added missing doc for minsize attribute
Fixes https://github.com/llvm/llvm-project/issues/53226
2022-06-10 21:18:45 +02:00
Louis Dionne d00e035a42 [libc++] Make sure we install the modulemap file with install-cxx-headers 2022-06-10 15:15:35 -04:00
Sam Estep a9ad689e35 [clang][dataflow] Don't `assert` full LHS coverage in `optional` model
Followup to D127434.

Reviewed By: ymandel, sgatev

Differential Revision: https://reviews.llvm.org/D127502
2022-06-10 19:10:20 +00:00
Sunho Kim f8a9536c55 [JITLink][ELF][AArch64] Implement eh frame handling.
Implements eh frame handling by using generic EHFrame passes. The c++ exception handling works correctly with this change.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D127063
2022-06-11 04:06:14 +09:00
Philip Reames eb912411e9 [RISCV] Add cost model coverage for mask reductions requiring legalization 2022-06-10 12:04:48 -07:00
Krzysztof Drewniak a2cdb9791b [mlir][AMDGPU] Set ABI version constant when linking device libs
Currently, linking the device libraries requires setting a constant
that indicates the code object ABI version the compilation is
targeting.

This fixes the MLIR linking process by setting this constant to 400,
which is the value corresponding to the current code object ABI
default, version 4.

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D126913
2022-06-10 18:40:52 +00:00
Shraiysh Vaishay f62baddac0 [OpenMP][IRBuilder] Add final clause to task
This patch adds final clause to OpenMP IR Builder.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D126626
2022-06-11 00:02:18 +05:30
Nikolas Klauser 13558334f3 [libc++] Remove uses of __two in type_traits
Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D127483
2022-06-10 19:56:59 +02:00
Mariusz Borsa a4bf361454 Revert "[Sanitizers] Cleanup handling of stat64/statfs64"
This reverts commit 6d890a0fb8.
2022-06-10 10:56:26 -07:00
Jay Foad ff85d61a6e Update *_TMPRING_SIZE.WAVESIZE for GFX11
The encoding of COMPUTE_TMPRING_SIZE.WAVESIZE and
SPI_TMPRING_SIZE.WAVESIZE has changed in GFX11: it is now in units
of 64 dwords instead of 256 dwords, and the field has been widened
from 13 bits to 15 bits.

Depends on D126989

Reviewed By: rampitec, arsenm, #amdgpu

Differential Revision: https://reviews.llvm.org/D127248
2022-06-10 13:24:00 -04:00
Thomas Raoux ed0288f7c4 [mlir][vector] Add patterns for vector distribution
Add pattern to hoist scalar code outside of warp distribute region as
those cannot be distributed and we would want to execute them on all
the lanes.
Add patterns to distribute transfer_write ops. Those operations can be
distributed in different ways and it is control by user.

Differential Revision: https://reviews.llvm.org/D127152
2022-06-10 17:46:51 +00:00
Kai Nacke b5019ffc8e [SystemZ/z/OS] Set DWARF version to 4 for z/OS.
The DWARF version was raised to 5 for all platforms which do not opt
out. Default to DWARF version to 4 for z/OS again.

Reviewed By: abhina.sreeskantharajan, uweigand

Differential Revision: https://reviews.llvm.org/D127498
2022-06-10 13:38:58 -04:00
Joe Nash ea3c9a87d3 [AMDGPU] gfx11 add bits to COMPUTE_PGM_RSRC3
Contributors:
Konstantin Zhuravlyov <kzhuravl_dev@outlook.com>

Patch 21/N for upstreaming of AMDGPU gfx11 architecture

Depends on D127143

Reviewed By: rampitec, #amdgpu, kzhuravl

Differential Revision: https://reviews.llvm.org/D127241
2022-06-10 13:07:14 -04:00
Shivam Gupta a01579ad0a [NFC] Suggest Release mode in clang GettingStarted.html
This fix https://github.com/llvm/llvm-project/issues/23841.
Lots of beginners are not of aware of this option do suggesting it here
would be helpful.
2022-06-10 11:00:05 +05:30
Christopher Di Bella f21187eb2d [clang][tablegen] adds human documentation to `WarningOption`
Building on D126796, this commit adds the infrastructure for being able
to print out descriptions of what each warning does.

Differential Revision: https://reviews.llvm.org/D126832
2022-06-10 17:23:00 +00:00
Joe Nash 78d8fdb88b [AMDGPU] NFC. Comment change to GFX10+ in AsmParser 2022-06-10 12:34:07 -04:00