- Jan 06, 2023
-
-
Nikita Popov authored
Revert "CodingStandards: restrict CamelCase variable names guideline to llvm/clang/clang-tools-extra/polly/bolt" This reverts commit ee9ccb11. See https://reviews.llvm.org/D140585#4019417 and following. Multiple people requested a revert of this change pending further discussion.
-
Nikita Popov authored
This reverts commit 2679e8bb. This change is a significant backwards-compatibility break, which does in fact break the entire Rust ecosystem, which uses an -fno-plt -mrelax-relocations=0 default. Please go through pre-commit review for this change in order to gain broader consensus.
-
Chuanqi Xu authored
Previously in collectFrameAllocas, we will iterate every instruction in the Function and we will iterate the function again later. It is redundnt.
-
Pierre van Houtryve authored
Fix an edge case `ExprConstant.cpp`'s `EvaluateWithSubstitution` when called by `CheckEnableIf` The assertion in `CallStackFrame::getTemporary` could fail during evaluation of nested calls to a function using `enable_if` when the second argument was a value-dependent expression. This caused a temporary to be created for the second argument with a given version during the evaluation of the inner call, but we bailed out when evaluating the second argument of the outer call due to the expression being value-dependent. After bailing out, we tried to clean up the argument's value slot but it caused an assertion to trigger in `getTemporary` as a temporary for the second argument existed, but only for the inner call and not the outer call. See the test case for a more complete description of the issue. Reviewed By: ahatanak Differential Revision: https://reviews.llvm.org/D139713
-
Benjamin Chetioui authored
-
Yeting Kuo authored
RISC-V uses ISD::ABS lower method (abs x) -> (smax_vl x (sub_vl 0, x)) for ISD::VP_ABS. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D141033
-
Akira Hatanaka authored
The result has to be saved to a string as the result might be overwritten by subsequent calls to getenv. https://pubs.opengroup.org/onlinepubs/009696899/functions/getenv.html See the discussion here: https://reviews.llvm.org/D137996#4029305
-
Noah Goldstein authored
Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D141076
-
Fangrui Song authored
-
ziqingluo-90 authored
Revert "[Fix]"[-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations"" This reverts commit ef47a0a7. Revert "[-Wunsafe-buffer-usage] Add a new `forEachDescendant` matcher that skips callable declarations" This reverts commit b2ac5fd7. This patch is causing failure in some Sanitizer tests (https://lab.llvm.org/buildbot/#/builders/5/builds/30522/steps/13/logs/stdio). Reverting the patch and its' fix.
-
Josh Stone authored
These new debug values get inserted after the place where the spill happens, which means they won't be reached by the reverse traversal of basic block instructions. This would crash or fail assertions if they contained any virtual registers to be replaced. We can manually handle the new debug values right away to resolve this. Fixes https://github.com/llvm/llvm-project/issues/59172 Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D139590
-
Akira Hatanaka authored
in C++ base or member initializers Differential Revision: https://reviews.llvm.org/D127442
-
Akira Hatanaka authored
struct property is set using dot notation Make sure the destructor is called if needed. Differential Revision: https://reviews.llvm.org/D136639
-
Xiaodong Liu authored
The CACOP instruction is mainly used for cache initialization and cache-consistency maintenance. Depends on D140872 Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D140527
-
Jie Fu authored
This patch fixes build failure due to -Wsign-compare in sparse2SparseRewrite(...) after https://reviews.llvm.org/D140871. ``` llvm-project/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp:842:32: error: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare] for (uint64_t i = 0; i < rank; i++) { ~ ^ ~~~~ 1 error generated. ``` Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D141104
-
Emilia Dreamer authored
If a function with a `requires` clause as a constraint has a decltype return type, such as `decltype(auto)`, the decltype was seen to be part of the constraint clause, rather than as part of the function declaration, causing it to be placed on the wrong line. This patch disallows decltype to be a part of these clauses Fixes https://github.com/llvm/llvm-project/issues/59578 Depends on D140339 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D140312
-
Emilia Dreamer authored
Previously, clang-format relied on a special method to parse concept definitions, `UnwrappedLineParser::parseConcept()`, which deferred to `UnwrappedLineParser::parseConstraintExpression()`. This is problematic, because the C++ grammar treats concepts and requires clauses differently, causing issues such as https://github.com/llvm/llvm-project/issues/55898 and https://github.com/llvm/llvm-project/issues/58130. This patch removes `parseConcept`, letting the formatter parse concept definitions as more like what they actually are, fancy bool definitions. NOTE that because of this, some long concept definitions change in their formatting, as can be seen in the changed tests. This is because of a change in split penalties, caused by a change in MightBeFunctionDecl on the concept definition line, which was previously `true` but with this patch is now `false`. One might argue that `false` is a more "correct" value for concept definitions, but I'd be fine with setting it to `true` again to maintain compatibility with previous versions. Fixes https://github.com/llvm/llvm-project/issues/58130 Depends on D140330 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D140339
-
Emilia Dreamer authored
This brings the noexcept qualifier more visually in line with the other keyword qualifiers, such as "final" and "override". Originally reported as https://github.com/llvm/llvm-project/issues/44542, it was closed as "working by design" and reinforcing tests were added as part of a218706c. The exact spacing depended on the `PointerAlignment` option, where the default value of `Right` would leave no space. This patch seeks to change this behaviour, regardless of the configured `PointerAlignment` option (matching the previous behaviour of the `Left` option). Closes https://github.com/llvm/llvm-project/issues/59729 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D140767
-
Brad Smith authored
-
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
-