- Jan 22, 2023
-
-
Johannes Doerfert authored
We really need a way to make the check line script deal with these automatically.
-
Roman Lebedev authored
The baseline `allowsMemoryAccess()` is wrong for X86. It assumes that aligned memory operations are always allowed, but that is not true. For example, We can not perform a 32-byte aligned non-temporal load of a 32-byte vector, without AVX2 that is, yet `allowsMemoryAccess()` will say it is allowed, so we may end up merging non-temporal loads, only to split them up to legalize them, and here we go again. NOTE: the test changes here are superfluous. The main effect is that without this change, in D141777, we'd get stuck endlessly merging and splitting non-temporal stores. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D141776
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Roman Lebedev authored
Otherwise instead of a compile-time error that you forgot to modify it, you'd get a run-time error, which happened every time i've added new expr. This is completely NFC, there are no other changes here.
-
Roman Lebedev authored
-
Argyrios Kyrtzidis authored
-
Johannes Doerfert authored
We already created a versioned `__tgt_kernel_arguments` struct but it was only briefly used and its content was passed in isolation anyway. This makes it hard to add more information in the future. With this patch we fully embrace the struct as means to pass information from the compiler to the plugin as part of a kernel launch. The patch also extends and renames the struct, bumping the version number to 2. Version 1 entries are auto-upgraded. This is in preparation for "bare" kernel launches, per kernel dynamic shared memory, CUDA/HIP lowering, etc. The `__tgt_target_kernel_nowait` interface was deprecated as it was unused. Once we actually implement support for something like that, we can add an appropriate API. Note: Only plugins with the `launch_kernel` interface are now supported. That means that a new clang won't be able to use an old runtime. An old clang can still use the new runtime since the libomptarget interface did not change. Differential Revision: https://reviews.llvm.org/D141232 -
Kazu Hirata authored
I've verified that the arguments to llvm::bit_width are all of uint64_t with: static_assert(std::is_same_v<uint64_t, decltype(Mask)>)
-
Simon Pilgrim authored
This will make some future legality checks easier.
-
David Green authored
This adds an Arm Cortex-M55 scheduling model, using the information from https://developer.arm.com/documentation/102692/latest/ Differential Revision: https://reviews.llvm.org/D141523
-
Kazu Hirata authored
This patch simplifies isSeveralBitsExtractOpFromShr. The following statements are equivalent: unsigned BitWide = 64 - countLeadingOnes(~(AndMask >> SrlImm)); unsigned BitWide = 64 - countLeadingZeros(AndMask >> SrlImm); Now, consider: if (BitWide && isMask_64(AndMask >> SrlImm)) { When isMask_64 returns true, AndMask >> SrlImm and BitWide must be nonzero. Since BitWide does not contribute to narrowing the condition, we can simplify the condition as: if (isMask_64(AndMask >> SrlImm)) { We can negate the condition for an early exit as recommended by the LLVM Coding Standards. Now, all of the following are equivalent if AndMask >> SrlImm is nonzero: MSB = BitWide + SrlImm - 1 MSB = (64 - countLeadingZero(AndMask >> SrlImm)) + SrlImm - 1 MSB = (63 - countLeadingZero(AndMask >> SrlImm)) + SrlImm MSB = 63 - countLeadingZero(AndMask) MSB = 63 ^ countLeadingZero(AndMask) MSB = findLastSet(AndMask, ZB_Undefined) -
Florian Hahn authored
Update sinkScalarOperands to consider all operands of recipes in replicate blocks as sink candidates This enables additional sinking opportunities and is another step towards retiring LLVM IR-based sinkScalarOperands. This enables iterative sinking of operands for successive calls of sinkScalarOperands. Depends on D139788. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D139790
-
- Jan 21, 2023
-
-
Simon Pilgrim authored
Test coverage for Issue #58110
-
Simon Pilgrim authored
We try to use X32 for tests on gnux32 triples
-
Nikolas Klauser authored
`<coroutine>` seems to be new enough to not be a huge problem. Reviewed By: Mordante, #libc Spies: libcxx-commits, ChuanqiXu Differential Revision: https://reviews.llvm.org/D140600
-
Nikolas Klauser authored
There are no tests for the aliases because clang doesn't diagnose deprecated template aliases currently. Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D127678
-
ShihPo Hung authored
LoopUnroll estimates the loop size via getInstructionCost(), but getInstructionCost() cannot pass CostKind to getVectorInstrCost(). And so does getShuffleCost() to getBroadcastShuffleOverhead(), getPermuteShuffleOverhead(), getExtractSubvectorOverhead(), and getInsertSubvectorOverhead(). To address this, this patch adds an argument CostKind to these functions. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D142116
-
Simon Pilgrim authored
-
Iain Sandoe authored
Address part of https://github.com/llvm/llvm-project/issues/60079. Deleted and Defaulted functions are implicitly inline, but that state is not set at the point that we perform the diagnostic checks for externally- visible non-inline functions; check the function body type explicitly in the diagnostic. Differential Revision: https://reviews.llvm.org/D141908
-
Jon Chesterfield authored
Move plugin initialization to libomptarget initialization. Removes the call_once control, probably fractionally faster overall. Fixes issue 60119 because the plugin initialization, which might try to dlopen unrelated shared libraries, is no longer nested within a call from application code. Fixes #60119 Reviewed By: Maetveis, jhuber6 Differential Revision: https://reviews.llvm.org/D142249
-
Simon Pilgrim authored
We try to use X32 for tests on gnux32 triples
-
Simon Pilgrim authored
-
Jay Foad authored
-
wanglei authored
This patch adds resolver, indirection and trampoline stubs for loongarch64, allowing lazy compilation to work. It assumes hard float feature exists. Depends on D141036 Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D141102
-
Timm Bäder authored
We often visit the same variable multiple times, e.g. once when checking its initializer and later when compiling the function. Unify both of those in visitVarDecl() and do the returning of the value in visitDecl(). This time, use a VariableScope instead of a DeclScope for local variables. This way, we don't emit Destroy ops for the local variables immediately after creating them. Differential Revision: https://reviews.llvm.org/D136815
-
Haojian Wu authored
-
Noah Goldstein authored
Previous logic was buggy and erroneously asserted that I->operand(0) must be the RMW instruction. This change fixes that and makes it so that the RMW instruction can be used in operand 0 or 1. Also update the tests to explicitly test RMW as operand 0/1 (no change to codegen). Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D142166
-
Dmitry Vyukov authored
There are no intrinsic functions that leak arguments. If the called function does not return, the current function does not return as well, so no possibility of use-after-return. Sanitizer function also don't leak or don't return. It's safe to both pass pointers to local variables to them and to tail-call them. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D142190
-
hezuoqiang authored
FileCheck patterns consisting of only `-cc1` on a line by itself often cause mismatches, e.g. with version strings formed from commit hashes such as "clang-cc1514432c58". They should be changed to contain more context and match more precisely. Differential Revision: https://reviews.llvm.org/D141886
-
Kazu Hirata authored
-
Amir Ayupov authored
Reuse getLTOCommonName in components other than Profile (to be used in Core) Reviewed By: #bolt, maksfb Differential Revision: https://reviews.llvm.org/D142259
-
wren romano authored
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D142074
-
Kazu Hirata authored
This patch adds C++20-style bit_floor, bit_ceil, and bit_width. In a subsequent patch, I'm going to define PowerOf2Floor in MathExtras.h in terms of bit_floor. Unfortunately, PowerOf2Ceil isn't quite the same as bit_ceil because PowerOf2Ceil(0) == 0, whereas bit_ceil(0) == 1. MathExtras.h does not have a function directly corresponding to bit_width, but Log2_32(X) + 1, which occurs in a few places, can be replaced with bit_width(X). Differential Revision: https://reviews.llvm.org/D142179
-
David Blaikie authored
(Phab review only sent in draft to use bazel presubmit testing - precommit human review was not required) Differential Revision: https://reviews.llvm.org/D142267
-
Amir Ayupov authored
In profile matching, if `.__uniq` suffix added for internal linkage symbols with `-funique-internal-linkage-names` prevents BOLT from matching to a binary function, try to strip the suffix and perform fuzzy name matching. Follow-up to D124117. Reviewed By: #bolt, maksfb Differential Revision: https://reviews.llvm.org/D142073
-
Matt Arsenault authored
This will allow for easier overriding of the pass.
-
Matt Arsenault authored
Bitcode inputs should produce bitcode intermediates by default.
-
Matt Arsenault authored
Move things that are naturally methods of ReducerWorkItem to be methods of ReducerWorkItem in the same source file.
-
Kazu Hirata authored
This patch drops the ZeroBehavior parameter from bit counting functions like countLeadingZeros. ZeroBehavior specifies the behavior when the input to count{Leading,Trailing}Zeros is zero and when the input to count{Leading,Trailing}Ones is all ones. ZeroBehavior was first introduced on May 24, 2013 in commit eb91eac9. While that patch did not state the intention, I would guess ZeroBehavior was for performance reasons. The x86 machines around that time required a conditional branch to implement countLeadingZero<uint32_t> that returns the 32 on zero: test edi, edi je .LBB0_2 bsr eax, edi xor eax, 31 .LBB1_2: mov eax, 32 That is, we can remove the conditional branch if we don't care about the behavior on zero. IIUC, Intel's Haswell architecture, launched on June 4, 2013, introduced several bit manipulation instructions, including lzcnt and tzcnt, which eliminated the need for the conditional branch. I think it's time to retire ZeroBehavior as its utility is very limited. If you care about compilation speed, you should build LLVM with an appropriate -march= to take advantage of lzcnt and tzcnt. Even if not, modern host compilers should be able to optimize away quite a few conditional branches because the input is often known to be nonzero from dominating conditional branches. In this iteration, I've moved the forward declarations of _BitScanForward outside the llvm space to fix builds on Windows. Differential Revision: https://reviews.llvm.org/D141798
-