- Jan 06, 2023
-
-
Chen Zheng authored
Dynamic tls access model will be lowered to MI which clobbers CTR in the loop in ISEL(ADDItlsgdLADDR) and post-isel CTR loop pass will revert the loop to a normal compare + branch form. So no need to add this clobber check in hardware loop insertion pass now. Reviewed By: nemanjai Differential revision: https://reviews.llvm.org/D140367
-
Brad Smith authored
Fuchsia already implements AddClangSystemIncludeArgs(). So it looks like we just have to switch over to using it. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D141073
-
Chen Zheng authored
Passes before hardware loop insertion change the loop to a form which is not a hardware loop candidate (return early before checking the ctr clobbers). And the PHI in the loop exit block is also optimized away. This breaks the previous test point when the case was committed. Fixing this by running this case just before hardware loop insertion pass. Reviewed By: nemanjai Differential revision: https://reviews.llvm.org/D140366
-
Xiaodong Liu authored
There are a few intrinsics or instructions on LoongArch that are only appropriate for loongarch32 target. So the feature "32bit" is added to implement it. Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D140872
-
Brad Smith authored
Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros Reviewed By: SixWeining, MaskRay Differential Revision: https://reviews.llvm.org/D141070
-
Jakub Kuderski authored
We need this because WGSL does not support extended multiplication ops. Fixes: https://github.com/llvm/llvm-project/issues/59563 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D141096
-
Yitzhak Mandelbaum authored
This reverts commit 5e8f597c. It caused msan and ubsan breakages.
-
Craig Topper authored
The instruction name is x.f with the destination type first. The template name was intended as "convert F to X". So the F comes first.
-
Kirill Stoimenov authored
It is only used in the LSAN specific part. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D140109
-
Jeffrey Byrnes authored
-
Murali Vijayaraghavan authored
Differential Revision: https://reviews.llvm.org/D141097
-
bixia1 authored
Add codegen pattern for sparse_tensor.indices_buffer. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D140871
-
Jakub Kuderski authored
Fix an off-by-one error in extended umul extension for WebGPU. Revert to the long multiplication algorithm originally added to wide integer emulation, which was deleted in D139776. It is much easier to see why it is correct. Add runtime tests based on the mlir-vulkan-runner. These run both with and without umul extension. Issue: https://github.com/llvm/llvm-project/issues/59563 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D141085
-
Owen Pan authored
Closes #38042. Differential Revision: https://reviews.llvm.org/D141035
-
Murali Vijayaraghavan authored
Differential Revision: https://reviews.llvm.org/D140188
-
Keno Fischer authored
This teaches LVI (and thus CVP) to extract range information from branches whose condition is negated using (`xor %c, true`). On the implementation side, we switch the cache to additionally track whether we're looking for the inverted value or not and otherwise using the existing support for computing inverted conditions. I think the biggest question here is why this negation shows up here at all. After all, it should always be possible for some other pass to fold such a negation into a branch, comparison or some other logical operation. Indeed, instcombine does just that. However, these negations can be otherwise fairly persistent, e.g. instsimplify is not able to exchange branch conditions from negations. In addition, jumpthreading, which sits at the same point in default pass pipeline also handles this pattern, which adds further evidence that we might expect these negations to not have been canonicalized away yet at this point in the pass pipeline. In the particular case I was looking at there was a bit of a circular dependency where flags computed by cvp were needed by instcombine, and incstombine's folding of the negation was needed for cvp. Adding a second instombine pass would have worked of course, but instcombine can be somewhat expensive, so it appeared desirable to not require it to have run before cvp (as is the case in the default pass pipeline). Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D140933
-
Fangrui Song authored
In C mode, if e1 has __attribute__((noreturn)) but e2 doesn't, `(c ? e1 : e2)` is incorrectly noreturn and Clang codegen produces `unreachable` which may lead to miscompiles (see [1] `gawk/support/dfa.c`). This problem has been known since 8c6b56f3 (2010) or earlier. Fix this by making the result type noreturn only if both e1 and e2 are noreturn, matching GCC. `_Noreturn` and `[[noreturn]]` do not have the aforementioned problem. Fix https://github.com/llvm/llvm-project/issues/59792 [1] Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D140868
-
Peter Rong authored
This rewrite fixes https://github.com/llvm/llvm-project/issues/59316. Previously LowerSwitch uses int64_t, which will crash on case branches using integers with more than 64 bits. Using APInt fixes this problem. This patch also includes a test Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D140747
-
Aaron Ballman authored
This was added to the static matchers in 125ccd37, but the dynamic matcher was missed. This adds the dynamic matcher to the list.
-
Zibi Sarbinowski authored
[Support] Do not run test on z/OS A part of the unit test CommandLineTest/BadResponseFile, added in the commit fd3d7a9f need to be disable for z/OS as it was already done for AIX platform. Reviewed By: fanbo-meng Differential Revision: https://reviews.llvm.org/D141084
-
Joshua Cranmer authored
Reviewed By: nikic, hctim Differential Revision: https://reviews.llvm.org/D141083
-
Yitzhak Mandelbaum authored
Previously, the model for structs modeled all fields in a struct when `createValue` was called for that type. This patch adds a prepass on the function under analysis to discover the fields referenced in the scope and then limits modeling to only those fields. This reduces wasted memory usage (modeling unused fields) which can be important for programss that use large structs. Note: This patch obviates the need for https://reviews.llvm.org/D123032. Differential Revision: https://reviews.llvm.org/D140694
-
Adrian Prantl authored
lldb::LanguageType is used as a parameter in SBExpressionOptions::SetLanguage(), which actually makes this type API too. Commit 6eaedbb5 added a `: uint16_t` to it, which broke binary compatibility for the SBAPI. This patch reverts to the original enum. I tried moving the entire enum into include/API, but that created a cyclic module dependency between API and Utility. To keep things simple, this just reverts to the original code and adds a warning. rdar://103415402 Differential Revision: https://reviews.llvm.org/D141087
-
Matt Arsenault authored
This was only used for checking if is_shared/is_private were legal, which we're not bothering to do anymore. This is apparently visible to more than the target attribute (which seems to silently ignore unrecognized features), so this has the potential to break something (i.e. see the OpenMP test change)
-
Xiang Li authored
Change clang::annotate into clang::annotate_type. The example will get error like error: 'annotate' attribute cannot be applied to types int* [[clang::annotate("category1", "foo", 1)]] f(int[[clang::annotate("category2")]] *); Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D139935 -
Vang Thao authored
Amdgpu kernel with function attribute "uniform-work-group-size"="true" requires uniform work group size (i.e. each dimension of global size is a multiple of corresponding dimension of work group size). hipExtModuleLaunchKernel allows to launch HIP kernel with non-uniform workgroup size, which makes it necessary for runtime to check and enforce uniform workgroup size if kernel requires it. To let runtime be able to enforce that, this metadata is needed to indicate that the kernel requires uniform workgroup size. Reviewed By: kzhuravl, arsenm Differential Revision: https://reviews.llvm.org/D141012
-
Fangrui Song authored
MC and lld/ELF defaults were flipped in 2016. For Clang: CMake ENABLE_X86_RELAX_RELOCATIONS defaults to on in 2020. It makes sense for the TargetOptions default to be true now. R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX require GNU ld newer than 2015-10 (subsumed by the current requirement of -fbinutils-version=). This should fix `rustc -Z plt=no` PIC relocatable files with GNU ld. (See https://github.com/rust-lang/rust/pull/106380)
-
Owen Pan authored
Account for an r_brace that precedes an "else if" statement when calculating whether the line might fit on one line if the r_brace is removed. Fixes #59778. Differential Revision: https://reviews.llvm.org/D140835
-
Saleem Abdulrasool authored
clang would improperly disallow GNU attributes before C++ standard attributes when a declaration had a linkage specifier. Handle this similarly to the previous case of invalid parsing. We now better match the parsing rules from GCC. Differential Revision: https://reviews.llvm.org/D140507 Reviewed By: aaron.ballman
-
Alexander Timofeev authored
Since the divergence-driven ISel was fully enabled we have more VGPRs available. MachineScheduler trying to take advantage of that bumps up the occupancy sacrificing the hiding of memory access latency. This really spoils the initially good schedule. A new metric that reflects the latency hiding quality of the schedule has been created to make it to balance between occupancy and latency. The metric is based on the latency model which computes the bubble to working cycles ratio. Then we use this ratio to decide if the higher occupancy schedule is profitable as follows: Profit = NewOccupancy/OldOccupancy * OldMetric/NewMetric Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D139710 -
ziqingluo-90 authored
[Fix]"[-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations" The original patch in commit b2ac5fd7 causes compilation errors which can be reproduced by the `-fdelayed-template-parsing` flag. This commit fixes the problem. Related differential revision: https://reviews.llvm.org/D138329
-
ziqingluo-90 authored
Revert "Revert "[-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations"" This reverts commit f58b0253. The previous revert reverts a patch that causes compilation problem on windows which can be reproduced using `-fdelayed-template-parsing`. I'm now to revert the patch back and commit a fix next.
-
Matt Arsenault authored
appendToGlobalCtors implicitly assumes this is the case, since it deletes and recreates without trying to update any uses. This ran into an interesting problem in a few linker tests. During the link, ConstantExpr casts were speculatively created to replace any uses that might need them for replacement. These unused ConstantExprs would hang around and still appear on the use list. It seems like a bug that those stick around, but I'm not sure where those are supposed to be cleaned up. Avoid this by not creating the casts for appending linkage. Delete one of the casts entirely as it breaks no tests. The verifier has enforced a specific type for these since 2011, so I don't see why we would need to handle linking modules with a wrong types. One test does fail without the second cast (Linker/appending-global-proto.ll, added by D95126). This test looks contrived; it's using appending linkage with a regular variable. The LangRef suggests this is illegal (and suggests another missing verifier check).
-
Aaron Ballman authored
We removed the Go bindings in https://reviews.llvm.org/D135436 but missed documentation that talks about the bindings.
-
Craig Topper authored
Reviewed By: reames Differential Revision: https://reviews.llvm.org/D140928
-
Fangrui Song authored
-
Jez Ng authored
We can technically handle them, but since they shouldn't come up in any real-world programs (since ld64 dedups strings unconditionally), there's no reason to support them. It's a thoroughly untested code path too -- as evidenced by the fact that the only test this change breaks is one that verifies that we reject relocations when dedup'ing. There is no test that covers the case where we handle relocations in cstring sections when dedup is disabled. Reviewed By: #lld-macho, oontvoo, keith, thakis Differential Revision: https://reviews.llvm.org/D141025
-
Florian Hahn authored
The tests contain a redundant condition in the else if branch that can be simplified with fb13dcf3. Update the condition used to prevent it from getting removed. Alive2 proof for check removal: https://alive2.llvm.org/ce/z/iFBnsy
-
Luke Drummond authored
I found one typo of "implemnt", then some more. s/implemnt/implement/g
-
Matt Arsenault authored
This was directly considering the pointee type, and also applying special semantics to constant address space.
-