- May 22, 2024
-
-
Simon Pilgrim authored
-
Nikita Popov authored
This function will return nullptr instead of returning a constant expression now, so be sure to handle that. Fixes https://github.com/llvm/llvm-project/issues/93017.
-
Michael Kruse authored
OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of `NumIterations` as generated for any `OMPLoopBasedDirective` which is an integer. Fixed by basing all generated loop variables on `NumIterations`. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a `DeclStmt` which made it difficult to add arbitrary statements from `CXXRangeForStmt`'s syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general `Stmt` that can be a `CompoundStmt` to hold arbitrary Stmts, inclu...
-
Michael Maitland authored
I had some trouble understanding why `removeReady` removed nodes from the Pending queue, since my intuition told me that the Pending queue did not represent a node that was ready. I took a deeper look and found that pickOnlyNode and pickNodeFromQueue only picked nodes from the Available queue too. I found that need to nodes from the Available and Pending queues that correspond to the opposite direction that we ended up choosing from (IsTopNode vs !IsTopNode). It took me a little longer than I would have liked to understand this fact, so I figured that I would add a comment in the code that makes it clear for future readers.
-
Krzysztof Parzyszek authored
Emit diagnostic messages for invalid modifiers in "reduction" clause. Fixes https://github.com/llvm/llvm-project/issues/92397
-
Yingwei Zheng authored
In `TargetLowering::ShrinkDemandedOp`, types of lhs and rhs may differ before legalization. In the original case, `VT` is `i64` and `SmallVT` is `i32`, but the type of rhs is `i8`. Then invalid truncate nodes will be created. See the description of ISD::SHL for further information: > After legalization, the type of the shift amount is known to be TLI.getShiftAmountTy(). Before legalization, the shift amount can be any type, but care must be taken to ensure it is large enough. https://github.com/llvm/llvm-project/blob/605ae4e93be8976095c7eedf5c08bfdb9ff71257/llvm/include/llvm/CodeGen/ISDOpcodes.h#L691-L712 This patch stops handling ISD::SHL in `TargetLowering::ShrinkDemandedOp` and duplicates the logic in `TargetLowering::SimplifyDemandedBits`. Additionally, it adds some additional checks like `isNarrowingProfitable` and `isTypeDesirableForOp` to improve the codegen on AArch64. Fixes https://github.com/llvm/llvm-project/issues/92720.
-
Florian Hahn authored
Look through SExt with a precondition that the operand is signed positive. https://alive2.llvm.org/ce/z/zvVVHj
-
Timm Bäder authored
-
Simon Pilgrim authored
Pulled out of #92096 - ensure we have completed a topological simplification of the SRA/SRL shift operands before we try to combine to a AVG node, as its difficult to later simplify through AVG nodes.
-
LLVM GN Syncbot authored
-
Timm Bäder authored
... back into range of the array.
-
pranavm-nvidia authored
This change adds bindings for `mlirDenseElementsAttrGet` which accepts a list of MLIR attributes and constructs a DenseElementsAttr. This allows for creating `DenseElementsAttr`s of types not natively supported by Python (e.g. BF16) without requiring other dependencies (e.g. `numpy` + `ml-dtypes`).
-
Paul Walker authored
-
Paul Walker authored
-
Paul Walker authored
-
Carlos Alberto Enciso authored
This reverts commit 89e1f778. https://github.com/llvm/llvm-project/pull/88270#discussion_r1609559724 https://github.com/llvm/llvm-project/pull/88270#discussion_r1609552972 Main concerns from @nikic are the interaction between the 'IndVars' and 'LoopDeletion' passes, increasing build times and adding extra complexity.
-
Tom Eccles authored
This means that this pass will also run on hlfir elemental operations which are not inside of functions. See RFC: https://discourse.llvm.org/t/rfc-add-an-interface-for-top-level-container-operations Some of the changes are from moving the declaration and definition of the constructor into tablegen (as requested during code review of another pass).
-
Timm Bäder authored
isArrayElement() returns false for them, so we used to add the decl to the path, causing wrong APValues to be generated.
-
Timm Bäder authored
We can call diagnoseNonConstVariable() for all ValueDecls just fine.
-
Balázs Kéri authored
-
Timm Bäder authored
This doesn't do anything with the current tests and is unnecessary in general.
-
Simon Pilgrim authored
Typo identified in #91854
-
Simon Pilgrim authored
Typo identified in #91854
-
Simon Pilgrim authored
Typo identified in #91854
-
Abid Qadeer authored
This PR add debug info for module variables. The module variables are added as global variables but their scope is set to module instead of compile unit. The scope of function declared inside a module is also set accordingly. After this patch, a module variable could be evaluated in the GDB as `p helper::gli` where helper is name of the module and gli is the name of the variable. A future patch will add the import module functionality which will remove the need to prefix the name with helper::. The line number where is module is declared is a best guess at the moment as this information is not part of the GlobalOp.
-
Timm Bäder authored
-
Lukacma authored
This patch removes FEAT_FPMR from list of available of architecture features, instead enabling FMPR register by default. Additionally dependencies between architectural features are added and fixed.
-
Shengchen Kan authored
1. MF.begin() == MF.end() -> MF.empty() 2. Set FlagsKilled by API modifiesRegister 3. Utilize APIs in X86GenMnemonicTables.inc to check arithmetic op 4. Merge duplicated code for rewrite* 5. Clang format This is to address review comments in #91849
-
Momchil Velikov authored
The patch at https://reviews.llvm.org/D122732 introduced using the array subscript operator for SVE vectors, however it also causes an ICE when the subscripting expression is used as an lvalue. This patches fixes the error. Lvalue subscripting expressions are emitted as LLVM IR `insertelement`.
-
Kiran Chandramohan authored
Re-enable tests starting with a or b.
-
Matt Arsenault authored
Fixes #93003
-
Mark de Wever authored
Libc++ has no separate C++98 support, it uses C++03 instead. This removes some obsolete c++98 markers in the test. Thanks to @StephanTLavavej for spotting this.
-
Florian Hahn authored
Additional test coverage for the VPlan-based cost model work.
-
Vlad Serebrennikov authored
This patch moves `Sema` functions that are specific for RISC-V into the new `SemaRISCV` class. This continues previous efforts to split `Sema` up. Additional context can be found in https://github.com/llvm/llvm-project/pull/84184. This PR is somewhat different from previous PRs on this topic: 1. Splitting out target-specific functions wasn't previously discussed. It felt quite natural to do, though. 2. I had to make some static function in `SemaChecking.cpp` member functions of `Sema` in order to use them in `SemaRISCV`. 3. I dropped "RISCV" from identifiers, but decided to leave "RVV" (RISC-V "V" vector extensions) intact. I think it's an idiomatic abbreviation at this point, but I'm open to input from contributors in that area. 4. I repurposed `SemaRISCVVectorLookup.cpp` for `SemaRISCV`. I think this was a successful experiment, which both helps the goal of splitting `Sema` up, and shows a way to approach `SemaChecking.cpp`, which I wasn't sure how to approach before. As we move more target-specific function out of there, we'll gradually make the checking "framework" inside `SemaChecking.cpp` public, which is currently a whole bunch of static functions. This would enable us to move more functions outside of `SemaChecking.cpp`.
-
ZhangYin authored
-
Mateusz Zych authored
Placing physically next to each other remaining constructors filling vector with the same value will make code better, since they all have nearly identical implementation, which needs to be kept in sync. Co-authored-by:Mark de Wever <koraq@xs4all.nl>
-
Sven van Haastregt authored
Recognize `cl_khr_kernel_clock` builtins and translate them to `OpReadClockKHR` instructions. The `Scope` operand is deduced from the builtin function name. spirv-val does not pass yet due to OpReadClockKHR only supporting the valid scopes for Vulkan (Device and Subgroup, but not Workgroup), so leave validation disabled with a TODO.
-
Yingwei Zheng authored
This patch adds support for G_UADDSAT/G_SADDSAT/G_USUBSAT/G_SSUBSAT by lowering it into add/sub with selects. When zbb is available, min/max/minu/maxu will be selected.
-
Felix Schneider authored
This patch includes the "no signed wrap" and "no unsigned wrap" flags, which can be used to annotate some Ops in the `arith` dialect and also in LLVMIR, in the integer range inference. The general approach is to use saturating arithmetic operations to infer bounds which are assumed to not wrap and use overflowing arithmetic operations in the normal case. If overflow is detected in the normal case, special handling makes sure that we don't underestimate the result range.
-
Sander de Smalen authored
The behaviour of the flag should be equivalent to __arm_streaming_compatible. At the moment, the name suggests that '-force-streaming-compatible-sve' on its own (i.e. without specifying `+sve`) enables the compiler to use the streaming-compatible subset of SVE instructions, but the semantics merely are that the function can be called with either PSTATE.SM=0 or PSTATE.SM=1.
-