- May 20, 2024
-
-
Yingchi Long authored
Previously `report_fatal_error` is used for reporting something goes wrong in the backend, but this is confusing because `report_fatal_error` basically means there are something unexpected & crashed in the backend. So, turn this "crash" into an elegant error reporting. After this patch, clang can diagnose it: bpf-crash.c:4:30: error: Invalid usage of the XADD return value 4 | u32 next_event_id() { return __sync_fetch_and_add(&GLOBAL_EVENT_ID, 1); } | ^ 1 error generated.
-
- May 19, 2024
-
-
Nhat Nguyen authored
This PR is to address the issue #84640
-
aengelke authored
This saves an extra iteration over the all instructions of the function.
-
aengelke authored
This is a pure optimization to avoid redundant extensions, but iterating over all users is expensive, so don't do this at -O0.
-
Alex Voicu authored
At the moment, Clang is rather liberal in assuming that 0 (and by extension unqualified) is always a safe default. This does not work for targets that actually use a different value for the default / generic AS (for example, the SPIRV that obtains from HIPSPV or SYCL). This patch is a first, fairly safe step towards trying to clear things up by querying a modules' default AS from the target, rather than assuming it's 0, alongside fixing a few places where things break / we encode the 0 == DefaultAS assumption. A bunch of existing tests are extended to check for non-zero default AS usage.
-
Vitaly Buka authored
Issue #92687 This reverts commit 112eadd5.
-
Vitaly Buka authored
Memory leak: https://lab.llvm.org/buildbot/#/builders/5/builds/43403 Issue #92687 This reverts commit 0ec3b972.
-
Vitaly Buka authored
Revert "[Bounds-Safety] Temporarily relax a `counted_by` attribute restriction on flexible array members" Together with 0ec3b972 breaks https://lab.llvm.org/buildbot/#/builders/5/builds/43403 Issue #92687 This reverts commit cef6387e.
-
Simon Pilgrim authored
No need for this to be vector specific, and its more likely that scalar cases will appear after #92576
-
Simon Pilgrim authored
No need for this to be vector specific, and its more likely that scalar cases will appear after #92096
-
Simon Pilgrim authored
[DAG] canCreateUndefOrPoison - only compute extract/index vector elt index knownbits when not poison We were calling computeKnownBits to determine the bounds of the element index without ensuring that it wasn't poison, meaning if we did freeze the index, isGuaranteedNotToBeUndefOrPoison would then fail as we can't call computeKnownBits through FREEZE for potentially poison values. Fixes #92569
-
Vitaly Buka authored
Fixes build after cfe9deb1 on https://lab.llvm.org/buildbot/#/builders/37/builds/34828
-
Simon Pilgrim authored
The only difference is the operand index for the element index variable.
-
David Green authored
-
Yingwei Zheng authored
This patch supports `G_CONSTANT_FOLD_BARRIER` on RISCV to generate the following inst seq without crash: ``` define i64 @xor_and_i64(i64 %x) { entry: %y = and i64 %x, 16383 %z = xor i64 %y, 16368 ret i64 %z } ``` -
LLVM GN Syncbot authored
-
paperchalice authored
In order to test SelectionDAG for target AMDGPU, we need CodeGenPassBuilder.
-
NAKAMURA Takumi authored
`__sanitizer_siginfo` has been introduced in D142117. (llvmorg-16-init-17950-ged9ef9b4) It is incompatible to -pedantic. `clang_rt.ctx_profile` has been introduced in #92456.
-
NAKAMURA Takumi authored
-
Mingming Liu authored
The smaller class member are more focused and easier to maintain. This also paves the way for partial header forward compatibility in https://github.com/llvm/llvm-project/pull/88212 --------- Co-authored-by:
Kazu Hirata <kazu@google.com>
-
Mingming Liu authored
Add 'sort' here since it's helpful when container type changes (for example, https://github.com/llvm/llvm-project/pull/88024 wants to change container type from `unordered_set` to `DenseMap) @MaskRay points out `std::` doesn't randomize the iteration order of `unordered_{set,map}`, and the iteration order for single build is deterministic.
-
Nicolai Hähnle authored
Labels are matched using a regexp of the form '^(pattern):', which requires the addition of a "suffix" concept to NamelessValue. Aside from that, the key challenge is that block labels are values, and we typically capture values including the prefix '%'. However, when labels appear at the start of a basic block, the prefix '%' is not included, so we must capture block label values *without* the prefix '%'. We don't know ahead of time whether an IR value is a label or not. In most cases, they are prefixed by the word "label" (their type), but this isn't the case in phi nodes. We solve this issue by leveraging the two-phase nature of variable generalization: the first pass finds all occurences of a variable and determines whether the '%' prefix can be included or not. The second pass does the actual substitution. This change also unifies the generalization path for assembly with that for IR and analysis, in the hope that any future changes avoid diverging those cases future. I also considered the alternative of trying to detect the phi node case using more regular expression special cases but ultimately decided against that because it seemed more fragile, and perhaps the approach of keeping a tentative prefix that may later be discarded could also be eventually applied to some metadata and attribute cases. Note that an early version of this change was reviewed as https://reviews.llvm.org/D142452, before version numbers were introduced. This is a substantially updated version of that change.
-
David Green authored
This will help in later patches where the checks for operands being instructions is removed, and might help not remove unnecessary poison lanes.
-
David Green authored
As a small addition to #91148, this uses copysign to produce the correct sign for zero when converting frem to div/trunc/mul when we do not know that the input is positive (and we care about sign bits). The copysign lets us get the sign of zero correct. In testing, the only case this produced different results than fmod was: frem -inf, 4.0 -> nan vs -nan
-
Jessica Clarke authored
Fixes: 060df78c
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Florian Hahn authored
The last use of the function has been removed a while ago. Remove the unused function.
-
Alex MacLean authored
Add support for generating `st.param` instructions with direct use of immediates. This eliminates the need for a `mov` instruction prior to the `st.param` resulting in more concise emitted PTX.
-
- May 18, 2024
-
-
Mircea Trofin authored
-
Valentin Clement authored
-
Krzysztof Parzyszek authored
Turns out it was already in Analysis/CFGLoopInfo, so just move it to IR/AsmPrinter.
-
Shengchen Kan authored
``` %1:gr64 = COPY $eflags OP1 may update eflags $eflags = COPY %1 OP2 may use eflags ``` To use eflags as input at 4th instruction, we need to use SETcc to preserve the eflags before 2, and update the source condition of OP2 according to value in GPR %1. In this patch, we support CCMP/CTEST as OP2.
-
Thorsten Schütt authored
-
Vlad Serebrennikov authored
-
Antonio Frighetto authored
Ignore `ImplicitCastExpr` when building `AttrExp` for capability attribute diagnostics. Fixes: https://github.com/llvm/llvm-project/issues/92118.
-
Fangrui Song authored
-
Kareem Ergawy authored
-
Michael Klemm authored
-
Fangrui Song authored
``` .irp foo,1 nop .endr nop ``` expands to an excess EOL between two nop lines. Other loop directives and .macro have the same issue. `Lex()` at "Jump to the macro instantiation and prime the lexer" requires that there is one single \n token in CurTok. Therefore, we cannot consume the trailing \n when parsing the macro(-like) body. (commit c6e787f7 (reverted by 1e5f29af)) Instead, skip the potential \n after jumpToLoc at handleMacroExit.
-