- Jun 20, 2023
-
-
Nikita Popov authored
-
Nikita Popov authored
-
Owen Pan authored
Also, reformat all clang-format related files. Differential Revision: https://reviews.llvm.org/D153208
-
Louis Dionne authored
Otherwise, Clang complains about format_ctx being unused in the tests when exceptions are disabled in Freestanding mode. I don't know why it doesn't complain not in freestanding mode. Differential Revision: https://reviews.llvm.org/D153301
-
Nikita Popov authored
-
Nikita Popov authored
-
Mark de Wever authored
Changes to preconditions have no impact on the library. Implements - LWG3927 Unclear preconditions for operator[] for sequence containers Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D153286
-
Mark de Wever authored
Note libc++ implemented this in its initial version. Implements - LWG3935 template<class X> constexpr complex& operator=(const complex<X>&) has no specification Reviewed By: #libc, philnik, ldionne Differential Revision: https://reviews.llvm.org/D153287
-
Nikita Popov authored
-
Simon Pilgrim authored
Wrap the getSExtOrTrunc/getZExtOrTrunc calls behind an IsSigned argument.
-
Nikita Popov authored
Commit the bitcode file instead of generating it dynamically, as this will no longer be possible in the future.
-
Louis Dionne authored
This fixes rdar://110330781, which asked for the feature-test macro for std::pmr to take into account the deployment target. It doesn't fix https://llvm.org/PR62212, though, because the availability markup itself must be disabled until some Clang bugs have been fixed. This is pretty vexing, however at least everything should work once those Clang bugs have been fixed. In the meantime, this patch at least adds the required markup (as disabled) and ensures that the feature-test macro for std::pmr is aware of the deployment target requirement. Differential Revision: https://reviews.llvm.org/D135813
-
Nikita Popov authored
-
Nikita Popov authored
These tests were testing both typed an opaque pointers. Only keep opaque pointers tests.
-
Nikita Popov authored
Commit the typed pointer bitcode file instead of producing it, as this will not be possible in the future anymore.
-
Simon Pilgrim authored
This is a generic DAG combine version of D151055 which recognizes when a signed ABDS can be safely replaced with a unsigned ABDU instruction if it is legal. Alive2: https://alive2.llvm.org/ce/z/pb5BjG Differential Revision: https://reviews.llvm.org/D153328
-
David Green authored
-
Jingu Kang authored
Add tablegen pattern for uaddlv(uaddlp(x)) ==> uaddlv(x). Differential Revision: https://reviews.llvm.org/D153323
-
Stephen Thomas authored
Differential Revision: https://reviews.llvm.org/D153322
-
Weining Lu authored
This patch optimizes code generation by leveraging the zeroing behavior of the `maskeqz`/`masknez` instructions. ``` int sel(int a, int b) { return (a < b) ? a : 0; } ``` ``` slt $a1,$a0,$a1 masknez $a2,$r0,$a1 maskeqz $a0,$a0,$a1 or $a0,$a0,$a2 ``` => ``` slt $a1,$a0,$a1 maskeqz $a0,$a0,$a1 ``` Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D153193 -
Pravin Jagtap authored
Verifying dominator tree is expensive using intra-pass asserts. Asserts added during D147408 are increasing the build time of libc significantly. This change does the verification after the atomic optimizer pass and should fix the regression reported in D153232. Reviewed By: arsenm, #amdgpu Differential Revision: https://reviews.llvm.org/D153261
-
Weining Lu authored
-
Tue Ly authored
Re-organize special cases and add a special case when `|x| < 2^-5`. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D153134
-
Tue Ly authored
Re-order exceptional branches and slightly adjust the evaluation. Depends on https://reviews.llvm.org/D153026 . Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D153062
-
Tue Ly authored
Re-order exceptional branches and slightly adjust the evaluation. Performance tested with the CORE-MATH project on AMD EPYC 7B12 (clocks/op) Reciprocal throughputs: ``` --- BEFORE --- $ CORE_MATH_PERF_MODE=rdtsc ./perf.sh tanhf [####################] 100 % (with -mavx2 -mfma) Ntrial = 20 ; Min = 7.794 + 0.102 clc/call; Median-Min = 0.066 clc/call; Max = 8.267 clc/call; [####################] 100 %. (with -msse4.2) Ntrial = 20 ; Min = 10.783 + 0.172 clc/call; Median-Min = 0.144 clc/call; Max = 11.446 clc/call; [####################] 100 %. (SSE2) Ntrial = 20 ; Min = 18.926 + 0.381 clc/call; Median-Min = 0.342 clc/call; Max = 19.623 clc/call; --- AFTER --- $ CORE_MATH_PERF_MODE=rdtsc ./perf.sh tanhf [####################] 100 % (with -mavx2 -mfma) Ntrial = 20 ; Min = 6.598 + 0.085 clc/call; Median-Min = 0.052 clc/call; Max = 6.868 clc/call; [####################] 100 % (with -msse4.2) Ntrial = 20 ; Min = 9.245 + 0.304 clc/call; Median-Min = 0.248 clc/call; Max = 10.675 clc/call; [####################] 100 %. (SSE2) Ntrial = 20 ; Min = 11.724 + 0.440 clc/call; Median-Min = 0.444 clc/call; Max = 12.262 clc/call; ``` Latency: ``` --- BEFORE --- $ PERF_ARGS="--latency" CORE_MATH_PERF_MODE=rdtsc ./perf.sh tanhf [####################] 100 % (with -mavx2 -mfma) Ntrial = 20 ; Min = 38.821 + 0.157 clc/call; Median-Min = 0.122 clc/call; Max = 39.539 clc/call; [####################] 100 %. (with -msse4.2) Ntrial = 20 ; Min = 44.767 + 0.766 clc/call; Median-Min = 0.681 clc/call; Max = 45.951 clc/call; [####################] 100 %. (SSE2) Ntrial = 20 ; Min = 55.055 + 1.512 clc/call; Median-Min = 1.571 clc/call; Max = 57.039 clc/call; --- AFTER --- $ PERF_ARGS="--latency" CORE_MATH_PERF_MODE=rdtsc ./perf.sh tanhf [####################] 100 % (with -mavx2 -mfma) Ntrial = 20 ; Min = 36.147 + 0.194 clc/call; Median-Min = 0.181 clc/call; Max = 36.536 clc/call; [####################] 100 % (with -msse4.2) Ntrial = 20 ; Min = 40.904 + 0.728 clc/call; Median-Min = 0.557 clc/call; Max = 42.231 clc/call; [####################] 100 %. (SSE2) Ntrial = 20 ; Min = 55.776 + 0.557 clc/call; Median-Min = 0.542 clc/call; Max = 56.551 clc/call; ``` Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D153026
-
Weining Lu authored
[LoongArch] Add missing chains and remove unnecessary `SDNPSideEffect` property for some intrinsic nodes
-
David Green authored
Similar to the existing f32 pattern, this adds a tablegen pattern for the fp16 fcvtn2.
-
Simi Pallipurath authored
Arm has BE8 big endian configuration called a byte-invariant(every byte has the same address on little and big-endian systems). When in BE8 mode: 1. Instructions are big-endian in relocatable objects but little-endian in executables and shared objects. 2. Data is big-endian. 3. The data encoding of the ELF file is ELFDATA2MSB. To support BE8 without an ABI break for relocatable objects,the linker takes on the responsibility of changing the endianness of instructions. At a high level the only difference between BE32 and BE8 in the linker is that for BE8: 1. The linker sets the flag EF_ARM_BE8 in the ELF header. 2. The linker endian reverses the instructions, but not data. This patch adds BE8 big endian support for Arm. To endian reverse the instructions we'll need access to the mapping symbols. Code sections can contain a mix of Arm, Thumb and literal data. We need to endian reverse Arm instructions as words, Thumb instructions as half-words and ignore literal data.The only way to find these transitions precisely is by using mapping symbols. The instruction reversal will need to take place after relocation. For Arm BE8 code sections (Section has SHF_EXECINSTR flag ) we inserted a step after relocation to endian reverse the instructions. The implementation strategy i have used here is to write all sections BE32 including SyntheticSections then endian reverse all code in InputSections via mapping symbols. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D150870 -
Joseph Huber authored
The GPU vendors currently provide bitcode files for their device runtime. These files need to be handled specially as they are not built to be linked in with a standard `llvm-link` call or through LTO linking. This patch adds an alternative to use the existing clang handling of these libraries that does the necessary magic to make this work. We do this by causing the LTO backend to emit bitcode before running the backend. We then pass this through to clang which uses the existing support which has been fixed to support this by D152391. The backend will then be run with the merged module. This patch adds the `--builtin-bitcode=<triple>=file.bc` to specify a single file, or just `--clang-backend` to let the toolchain handle its defaults (currently nothing for NVPTX and the ROCm device libs for AMDGPU). This may have a performance impact due to running the optimizations again, we could potentially disable optimizations in LTO and only do the linking if this is an issue. This should allow us to resolve issues when relying on the `linker-wrapper` to do a late linking that may depend on vendor libraries. Depends on D152391 Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D152442
-
Joseph Huber authored
Clang provides the `-mlink-bitcode-file` and `-mlink-builtin-bitcode` options to insert LLVM-IR into the current TU. These are usefuly primarily for including LLVM-IR files that require special handling to be correct and cannot be linked normally, such as GPU vendor libraries like `libdevice.10.bc`. Currently these options can only be used if the source input goes through the AST consumer path. This patch makes the changes necessary to also support this when the input is LLVM-IR. This will allow the following operation: ``` clang in.bc -Xclang -mlink-builtin-bitcode -Xclang libdevice.10.bc ``` Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D152391
-
Matthias Springer authored
Add extra error checking to prevent passes from being run on unsupported ops through the pass manager infrastructure. Differential Revision: https://reviews.llvm.org/D153144
-
Haojian Wu authored
This fixes a false positive where a ParamVarDecl happend to be the same name of some C standard symbol and has a global namespace. ``` using A = int(int time); // we suggest <ctime> for the `int time`. ``` Differential Revision: https://reviews.llvm.org/D153330
-
Vladislav Dzhidzhoev authored
Revert "Reland "[DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)" (2)" This reverts commit cb9ac705. It causes an assert in clang: virtual void llvm::DwarfDebug::endFunctionImpl(const llvm::MachineFunction*): Assertion `LScopes.getAbstractScopesList().size() == NumAbstractSubprograms && "getOrCreateAbstractScope() inserted an abstract subprogram scope"' failed. https://bugs.chromium.org/p/chromium/issues/detail?id=1456288#c2
-
Alexey Lapshin authored
This patch is a followup for D153162. It cures one more place where indexed address was incorrectly read. It also moves handling of indexed address into DWARFUnit. Differential Revision: https://reviews.llvm.org/D153297
-
Alex Zinenko authored
LLVM build system separates between `add_llvm_example_library` and `add_llvm_library`, which is presumably used to package examples separately from the regular library. Introduce a similar approach to building example libraries in MLIR and use it for the transform dialect tutorial. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D153265
-
Harvin Iriawan authored
- Update the Cortex-A510 mcpu target to use A510 scheduling info instead of A55. Values taken are based on the A510 software optimisation guide https://developer.arm.com/documentation/PJDOC-466751330-536816/latest - Make latency of most integer ops to 1. CPU uarch is able to resolve most integer ops in 1 cycle Differential Revision: https://reviews.llvm.org/D152688
-
ManuelJBrito authored
Drop alignment to allow test to run in different platforms. Differential Revision: https://reviews.llvm.org/D152547
-
Chuanqi Xu authored
Try to address part of https://github.com/llvm/llvm-project/issues/61900. It is not completely addressed since the original reproducer is not fixed due to the final suspend point is optimized out in its special case. But that is a relatively independent issue.
-
Ivan Kosarev authored
They cause failures on the llvm-clang-x86_64-expensive-checks-debian buildbot. This partially reverts D153269 [AMDGPU][GFX11] Add test coverage for FMA instructions.
-
Jan Svoboda authored
This is a follow-up to D151938 that should fix GCC's -Wcast-qual warning.
-