- May 11, 2022
-
-
Sanjay Patel authored
-
Joseph Huber authored
Summary: We use the `--offload-new-driver` option to enable offload code embedding. The check for when to do this was flawed and was enabling it too early in the case of OpenMP, causing a segfault when dereferencing the offloading toolchain.
-
Jan Korous authored
Specifically for: !tbaa, !tbaa.struct, !annotation, !srcloc, !nosanitize. The goal is to avoid test brittleness caused by hardcoded values. Differential Revision: https://reviews.llvm.org/D123273
-
Matthias Braun authored
We often see code like the following after running SCCP: switch (x) { case 42: phi(42, ...); } This tends to produce bad code as we currently materialize the constant phi-argument in the switch-block. This increases register pressure and if the pattern repeats for `n` case statements, we end up generating `n` constant values. This changes CodeGenPrepare to catch this pattern and revert it back to: switch (x) { case 42: phi(x, ...); } Differential Revision: https://reviews.llvm.org/D124552 -
Matthias Braun authored
This adds a `TargetLoweringBase::getSwitchConditionType` callback to give targets a chance to control the type used in `CodeGenPrepare::optimizeSwitchInst`. Implement callback for X86 to avoid i8 and i16 types where possible as they often incur extra zero-extensions. This is NFC for non-X86 targets. Differential Revision: https://reviews.llvm.org/D124894
-
Matthias Braun authored
- Change `switch.ll` test to a style suitable for `tools/update_llc_test_checks.py`. - Precommit test for upcoming changes: - Add `switch_i8` to `test/CodeGen/X86/switch.ll`. - Add `test/CodeGen/X86/switch-phi-const.ll`. Differential Revision: https://reviews.llvm.org/D124893
-
Kadir Cetinkaya authored
- Make clangd's internal representation more aligned with the standard. We keep range and extra inlayhint kinds around, but don't serialize them on standard version. - Have custom serialization for extension (ugly, but going to go away). - Support both versions until clangd-17. - Don't advertise extension if client has support for standard implementation. - Log a warning at startup about extension being deprecated, if client doesn't have support. Differential Revision: https://reviews.llvm.org/D125228
-
Mike Rice authored
Add mangling for linear parameters specified with ref, uval, and val for 'omp declare simd' vector functions. Add missing stride for linear this parameters. Differential Revision: https://reviews.llvm.org/D125269
-
Tsukasa OI authored
This commit adds 'K' to supported extension list (before 'J'). It makes "Zk*" extensions correctly placed before "Zv*" extensions. Multi-letter "Z*" extensions are first ordered with the most closely related alphabetical extension category ("IMAF..."). This is represented in LLVM as `AllStdExts' variable in `llvm/lib/Support/RISCVISAInfo.cpp'. However, it did not have 'k' making "Zk*" extensions not correctly ordered. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D124340 -
Krzysztof Drewniak authored
This ensures that attributes such as the index bitwidth propagate correctly to the AMDGPUToROCDL patterns. Differential Revision: https://reviews.llvm.org/D125320
-
Konstantin Varlamov authored
The view itself has been implemented previously -- this patch only adds the ability to pipe it. Also finishes the implementation of [P1739](https://wg21.link/p1739) and [LWG3407](https://wg21.link/lwg3407). Differential Revision: https://reviews.llvm.org/D125156
-
David Green authored
This reverts commit 7dcd0ea6 due to issues reported postcommit with the correctness of truncated cttzs.
-
Craig Topper authored
Previously we took the old name and always appended a numberic suffix. Since we're doing a 1:1 replacement, it's clearer to keep the original name exactly. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D125281
-
Craig Topper authored
This makes the output IR more readable since we're doing a one to one replacement. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D125280
-
- May 10, 2022
-
-
Peter Klausler authored
Fortran 2018 requires that a compiler allow objects whose rank + corank is 15, and that's our maximum; detect and diagnose violations. Differential Revision: https://reviews.llvm.org/D125153
-
Nikita Popov authored
-
Ivan Kosarev authored
Also makes a step towards resolving https://github.com/llvm/llvm-project/issues/38652 Reviewed By: foad, dp Differential Revision: https://reviews.llvm.org/D125117
-
Aaron Ballman authored
The controlling expression of a _Generic selection expression undergoes lvalue conversion, array conversion, and function conversion before picking the association. This means that array types, function types, and qualified types are all unreachable code if they're used as an association. I've been caught by this twice in the past few months and I figure that if a WG14 member can't seem to remember this rule, users are also likely to struggle with it. So this adds an on-by-default unreachable code diagnostic for generic selection expression associations. Note, we don't have to worry about function types as those are already a constraint violation which generates an error. Differential Revision: https://reviews.llvm.org/D125259
-
Peter Klausler authored
Evaluate real-valued references to the intrinsic functions MODULO and MOD at compilation time without recourse to an external math library. Differential Revision: https://reviews.llvm.org/D125151
-
Louis Dionne authored
-
Ashay Rane authored
This patch updates calls to AnalysisState::getBuffer() so that we return early with a failure if the call does not succeed. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D125251
-
Daniel Bertalan authored
In case of placement new, if we do not know the alignment of the operand, we can't assume it has the preferred alignment. It might be e.g. a pointer to a struct member which follows ABI alignment rules. This makes UBSAN no longer report "constructor call on misaligned address" when constructing a double into a struct field of type double on i686. The psABI specifies an alignment of 4 bytes, but the preferred alignment used by Clang is 8 bytes. We now use ABI alignment for allocating new as well, as the preferred alignment should be used for over-aligning e.g. local variables, which isn't relevant for ABI code dealing with operator new. AFAICT there wouldn't be problems either way though. Fixes #54845. Differential Revision: https://reviews.llvm.org/D124736
-
Krzysztof Drewniak authored
By analogy with the NVGPU dialect, introduce an AMDGPU dialect for AMD-specific intrinsic wrappers. The dialect initially includes wrappers around the raw buffer intrinsics. On AMD GPUs, a memref can be converted to a "buffer descriptor" that allows more precise control of memory access, such as by allowing for out of bounds loads/stores to be replaced by 0/ignored without adding additional conditional logic, which is important for performance. The repository currently contains a limited conversion from transfer_read/transfer_write to Mubuf intrinsics, which are an older, deprecated intrinsic for the same functionality. The new amdgpu.raw_buffer_* ops allow these operations to be used explicitly and for including metadata such as whether the target chipset is an RDNA chip or not (which impacts the interpretation of some bits in the buffer descriptor), while still maintaining an MLIR-like interface. (This change also exposes the floating-point atomic add intrinsic.) Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D122765
-
Sam McCall authored
This is generally a better default for tools other than the compiler, which shouldn't assume a PCH file on disk is something they can consume. Preserve the old behavior in places associated with libclang/c-index-test (including ASTUnit) as there are tests relying on it and most important consumers are out-of-tree. It's unclear whether the tests are specifically trying to test this functionality, and what the downstream implications of removing it are. Hopefully someone more familiar can clean this up in future. Differential Revision: https://reviews.llvm.org/D125149
-
Peter Klausler authored
Fold references to the intrinsic function DIM with constant real arguments. And clean up folding of comparisons with NaNs to address a problem noticed in testing -- NaNs should successfully compare unequal to all values, including themselves, instead of failing all comparisons. Differential Revision: https://reviews.llvm.org/D125146
-
Chris Lattner authored
A typical problem with missing a token is that the missing token is at the end of a line. The problem with this is that the error message gets reported on the start of the following line (which is where the next / invalid token is) which can be confusing. Handle this by noticing this case and backing up to the end of the previous line. Differential Revision: https://reviews.llvm.org/D125295
-
Amy Kwan authored
This patch adds 32-bit AIX RUN lines to several test cases, along with the addition of one new test case, to prepare for future codegen changes involving the PPCISD::SCALAR_TO_VECTOR_PERMUTED node on 32-bit mode.
-
Nicolai Hähnle authored
Only fold for uniform values on pre-GFX9 chips. GFX9+ allow us to keep the calculation entirely on the SALU. For subtargets where integer multiplication isn't full-rate, avoid folding if the multiply has too many uses. Finally, we expand 64x32 and 64x64 multiplies here as well, if they feed into an addition. This results in better code generation than the generic expansion for such multiplies because we end up using the accumulator of the MAD instructions. Differential Revision: https://reviews.llvm.org/D123835
-
Dawid Jurczak authored
Before this change GVNSink pass suffers from stack overflow while processing self referenced instruction in unreachable basic block. According [1] and [2] it's reasonable to make pass resistant against self referencing instructions. To fix issue we skip sinking analysis when we reach instruction coming from unreachable block. [1] https://groups.google.com/g/llvm-dev/c/843Tig9IzwA [2] https://lists.llvm.org/pipermail/llvm-dev/2015-February/082629.html Differential Revision: https://reviews.llvm.org/D113897
-
Louis Dionne authored
When we terminate due to an exception being uncaught, libc++abi prints a message saying "terminating with uncaught exception [...]". This patch changes that to say "terminating due to uncaught exception [...]" instead, which is a bit clearer. Indeed, I've seen some people being confused and thinking that libc++abi was the component throwing the exception. Differential Revision: https://reviews.llvm.org/D125245
-
Nikita Popov authored
Mixed int/pointer min/max are no longer possible.
-
Alexey Bataev authored
NFC.
-
Nikita Popov authored
-
Nicolai Hähnle authored
Differential Revision: https://reviews.llvm.org/D124808
-
Rosie Sumpter authored
Currently for SVE2 ACLE builtins, single tests are used to verify both clang code generation (when the feature is available) and semantic error/warning messages (when the feature is unavailable). This patch moves the semantic testing for the target feature flag into dedicated Sema tests. Differential Revision: https://reviews.llvm.org/D124850
-
Rosie Sumpter authored
Currently for SVE ACLE builtins, single tests are used to verify both clang code generation (when the feature is available) and semantic error/warning messages (when the feature is unavailable). This patch moves the semantic testing into dedicated Sema tests. Differential Revision: https://reviews.llvm.org/D124924
-
Haojian Wu authored
Running on SemaDecl.cpp with the cxx.bnf grammar: ``` -------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------- runParseBNFGrammar 649389 ns 649365 ns 1013 runBuildLR 34591903 ns 34591380 ns 20 runPreprocessTokens 11418744 ns 11418703 ns 61 bytes_per_second=63.8971M/s runGLRParse 282996863 ns 282988726 ns 2 bytes_per_second=2.57827M/s runParseOverall 294969719 ns 294951870 ns 2 bytes_per_second=2.4737M/s ``` Differential Revision: https://reviews.llvm.org/D125226
-
Adrian Kuegel authored
-
Fraser Cormack authored
-
Nikita Popov authored
nuw does not make sense for reverse iteration.
-