- May 07, 2024
-
-
Kiran Chandramohan authored
Cycle is associated with construct-names and not labels. Change name of a few variables to reflect this. Also add appropriate comment to describe the else case of error checking.
-
Haojian Wu authored
With the commit d5308949, we now preserve the initializer for invalid decls with the recovery-expr. However there is a chance that the original init expr is a typo-expr, we should not preserve it in the final AST, as typo-expr is an internal AST node. We should use the one after the typo correction. This is spotted by a clangd hover crash on the testcase.
-
Abhishek Varma authored
-- This commit adds a canonicalization pattern to fold away iter args of scf.forall if :- a. The corresponding tied result has no use. b. It is not being modified within the loop. Signed-off-by:Abhishek Varma <avarma094@gmail.com>
-
Timm Bäder authored
... even if the storage types are different.
-
Timm Bäder authored
Demonstrate that this isn't yet working right.
-
Chuanqi Xu authored
The test fails after dfa7ff97. I didn't find this locally due to cache.
-
Thorsten Schütt authored
look through shuffle vectors
-
Mingming Liu authored
* This way the helper function could be re-used by indirect-call-promotion pass to find out the vtable for an indirect call and extract the value profiles if any. * The parent patch is https://github.com/llvm/llvm-project/pull/80762
-
Shilei Tian authored
-
Chuanqi Xu authored
into the current module Following of https://github.com/llvm/llvm-project/pull/86912. After https://github.com/llvm/llvm-project/pull/86912, with reduced BMI, the BMI can keep unchange if the dependent modules only changes the implementation (without introduing new decls). However, this is not strictly correct. For example: ``` // a.cppm export module a; export inline int a() { ... } // b.cppm export module b; import a; export inline int b() { return a(); } ``` Since both `a()` and `b()` are inline, we need to make sure the BMI of `b.pcm` will change after the implementation of `a()` changes. We can't get that naturally since we won't record the body of `a()` during the writing process. We can't reuse ODRHash here since ODRHash won't calculate the called function recursively. So ODRHash will be problematic if `a()` calls other inline functions. Probably we can solve this by a new hash mechanism. But the safety and efficiency may a problem too. Here we just combine the hash value of the used modules conservatively.
-
Eli Friedman authored
-
Chuanqi Xu authored
of elements Close https://github.com/llvm/llvm-project/issues/91105 The root reason for the issue is that we always generate the dependently-sized array types which don't specify a number of elements. The original comment says: > We do no canonicalization here at all, which is okay > because they can't be used in most locations. But now we find the locations.
-
Owen Pan authored
Also adds AllowShortCaseExpressionOnASingleLine option and AlignCaseArrows suboption of AlignConsecutiveShortCaseStatements. Fixes #55903.
-
SahilPatidar authored
First step for #64840.
-
Jianjian Guan authored
This patch adds basic codegen support for Zvfbfmin extension.
-
Joseph Huber authored
Summary: This patch removes the special-case handling for the target triple inside of the CMake. I moved it into the implementation so it's easier to see and modify.
-
S. Bharadwaj Yadavalli authored
Revert "[DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version" (#91290) Reverts llvm/llvm-project#90809 Need to investigate ASAN failures.
-
Monad authored
Fold ``` llvm define i64 @src(i64 %50) { %52 = lshr i64 -1, %50 %53 = add i64 %52, 1 %54 = call i64 @llvm.cttz.i64(i64 %53, i1 false) ret i64 %54 } ``` to ``` llvm define i64 @tgt(i64 %50) { %52 = sub i64 64, %50 ret i64 %52 } ``` as https://github.com/llvm/llvm-project/pull/91171#pullrequestreview-2040663002 pointed out. Alive2 proof: https://alive2.llvm.org/ce/z/2aHfYa Note: the `ctlz` version of this pattern seems not exist in dtcxzyw's benchmark, so put it aside for now. -
Monad authored
There is a missed optimization in ``` llvm define i8 @known_power_of_two_rust_next_power_of_two(i8 %x, i8 %y) { %2 = add i8 %x, -1 %3 = tail call i8 @llvm.ctlz.i8(i8 %2, i1 true) %4 = lshr i8 -1, %3 %5 = add i8 %4, 1 %6 = icmp ugt i8 %x, 1 %p = select i1 %6, i8 %5, i8 1 %r = urem i8 %y, %p ret i8 %r } ``` which is extracted from the Rust code ``` rust fn func(x: usize, y: usize) -> usize { let z = x.next_power_of_two(); y % z } ``` Here `%p` (a.k.a `z`) is semantically a power-of-two, so `y urem p` can be optimized to `y & (p - 1)`. (Alive2 proof: https://alive2.llvm.org/ce/z/H3zooY) --- It could be generalized to recognizing `LShr(UINT_MAX, Y) + 1` as a power-of-two, which is what this PR does. Alive2 proof: https://alive2.llvm.org/ce/z/zUPTbc -
Nikita Popov authored
For inbounds GEPs, if the source pointer is non-null, the result must also be non-null. However, this does not hold for non-inbounds GEPs. Fixes https://github.com/llvm/llvm-project/issues/91177. -
Nikita Popov authored
Originally, the callbr result could only be used on the fallthrough destination. This limitation has been lifted, and the result is now also available on the indirect destinations. However, LangRef was not updated to reflect this.
-
Nikita Popov authored
Revert "[coro][CoroSplit] Use `llvm.lifetime.end` to compute putting objects on the frame vs the stack (#90265)" This reverts commit fcf341d3. Causes major compile-time regressions when not using coroutines.
-
alx32 authored
Currently in `ObjcCategoryMerger::doMerge` and `generateCatListForNonErasedCategories` we use maps of pointers which leads to non-determinism. Switch instead to using `MapVector` which preserves determinism.
-
antangelo authored
Fixes an inactive check line and updates the check to match output and other cases.
-
Ryosuke Niwa authored
[webkit.RefCntblBaseVirtualDtor] Ignore WTF::RefCounted<T> and its variants missing virtual destructor (#91009)
-
Ryosuke Niwa authored
-
Ian Anderson authored
stdarg.h and especially stddef.h are textual and so everything they declare gets precompiled into all of their clients' pcm files. They shouldn't directly declare anything though, their purpose is to select what submodules get imported, and not to add duplicate declarations to all of their clients. Make it so that they always ignore their header guards, even without modules, and declare them in separate header files so that they only go into the stdarg/stddef pcms. Still declare them in case clients rely on them.
-
Schrodinger ZHU Yifan authored
Such APIs are useful in lock implementations
-
Valentin Clement (バレンタイン クレメン) authored
fir.cuda_free operation was wrongly generated for dummy argument.
-
S. Bharadwaj Yadavalli authored
An earlier commit provided a way to decouple DXIL version from Shader Model version by representing the DXIL version as `SubArch` in the DXIL Target Triple and adding corresponding valid DXIL Arch types. This change constructs DXIL target triple with DXIL version that is deduced from Shader Model version specified in the following scenarios: 1. When compilation target profile is specified: For e.g., DXIL target triple `dxilv1.8-unknown-shader6.8-library` is constructed when `-T lib_6_8` is specified. 2. When DXIL target triple without DXIL version is specified: For e.g., DXIL target triple `dxilv1.8-pc-shadermodel6.8-library` is constructed when `-mtriple=dxil-pc-shadermodel6.8-library` is specified. Updated relevant HLSL tests that check for target triple. Validated that Clang (`check-clang`) and LLVM (`check-llvm`) regression tests pass.
-
Krzysztof Parzyszek authored
Address review comments for PR91214.
-
Jonas Devlieghere authored
Use add_custom_command instead of add_custom_target to generate SBLanguages.h.
-
Chris B authored
This implements the HLSL 202x conforming literals feature. The feature proposal is available here: https://github.com/microsoft/hlsl-specs/blob/main/proposals/0017-conforming-literals.md The language specification for this behavior is available in (poorly rendered) HTML or PDF: https://microsoft.github.io/hlsl-specs/specs/hlsl.html#Lex.Literal.Float https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf The main implementation details are: 1) Unsuffixed floating literals are `float`. 2) The integer `ll` suffix specifies `int64_t (aka long)` which is 64-bit because HLSL has no defined `long` keyword or `long long` type. Resolves #85714
-
Chris B authored
This adds a document to describe the DXContainer format and the structures of data inside the file. Resolves #88775
-
David Tenty authored
Revert the portion of https://github.com/llvm/llvm-project/pull/75125 which modified the LIBOMP_HEADERS_INSTALL_PATH in standalone build. This change is harmful for real standalone builds (i.e. builds where we build openmp by itself), since it tries to overwrite the `omp.h` inside the build compiler. For all-in-one builds with clang, testing shows this change is unnecessary as https://github.com/llvm/llvm-project/pull/88007 already set up that build configuration so that omp.h will be put into the project build's `clang` resource directory.
-
Keith Smiley authored
-
Alan Zhao authored
[coro][CoroSplit] Use `llvm.lifetime.end` to compute putting objects on the frame vs the stack (#90265) The current logic for using lifetime intrinsics to determine whether a coroutine alloca should live on the coroutine frame or stack doesn't consider `llvm.lifetime.end`. As a result, some allocas are incorrectly placed on the stack even though their lifetimes may outlive the stack. For example, SimplifyCFG may generate code that drops the corresponding `llvm.lifetime.end` of an `llvm.lifetime.start`, and that code is incorrectly handled by the existing logic. To fix this, new logic is introduced where if an alloca's address is escaped, and there is a path from an `llvm.lifetime.start` to a coroutine suspend point (e.g. `llvm.coro.suspend`) without an `llvm.lifetime.end`, then we know the object lives beyond the suspension point and therefore must go on the coroutine frame. Fixes https://github.com/llvm/llvm-project/issues/86580
-
Krzysztof Parzyszek authored
Insert the barrier after the last _executed_ copy, not the most recently inserted copy. This fixes https://github.com/llvm/llvm-project/issues/91205.
-
Alexander Yermolovich authored
We need to update DW_AT_comp_dir/DW_AT_dwo_name TU in the .debug_info.dwo section so that the path is correct. Refactored helper functions to make it easier for next step.
-
Brandt Bucher authored
This uses non-volatile registers for the first four (six on Windows) registers used for `preserve_none` argument passing. This allows these registers to stay "pinned", even if the body of the `preserve_none` function contains calls to other "normal" functions. Example: ```c void boring(void); __attribute__((preserve_none)) void (continuation)(void *, void *, void *, void *); __attribute__((preserve_none)) void entry(void *a, void *b, void *c, void *d) { boring(); __attribute__((musttail)) return continuation(a, b, c, d); } ``` Before: ```asm pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 callq boring@PLT movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx popq %rax jmp continuation@PLT ``` After: ```asm pushq %rax callq boring@PLT popq %rax jmp continuation@PLT ```
-