- Sep 02, 2022
-
-
Florian Hahn authored
Add test case where GlobalOpt fails to remove loads to global fields with struct types.
-
Utkarsh Saxena authored
As discussed in this [comment](https://github.com/llvm/llvm-project/issues/56183#issuecomment-1224331699), we end up building the lambda twice: once while parsing the function calls and then again while handling the immediate invocation. This happens specially during removing nested immediate invocation. Eg: When we have another consteval function as the parameter along with this lambda expression. Eg: `foo(bar([]{}))`, `foo(bar(), []{})` While removing such nested immediate invocations, we should not rebuild this lambda. (IIUC, rebuilding a lambda would always generate a new type which will never match the original type from parsing) Fixes: https://github.com/llvm/llvm-project/issues/56183 Fixes: https://github.com/llvm/llvm-project/issues/51695 Fixes: https://github.com/llvm/llvm-project/issues/50455 Fixes: https://github.com/llvm/llvm-project/issues/54872 Fixes: https://github.com/llvm/llvm-project/issues/54587 Differential Revision: https://reviews.llvm.org/D132945
-
Mikael Holmen authored
hasOnlyColdCalls skipped over calls to intrinsics, but it did so after checking the linkage of the called function. This meant that the presence of a call to a debug intrinsic could affect the outcome of the optimization. In my original reproducer (for an out of tree target) it was particularly interesting, because the actual IR after GlobalOpt was not different with debug instrinsics present, so -print-after-all printouts didn't show anything there. However, without debuginfo, GlobalOpt went further and ran BlockFrequencyAnalysis and (more importanly) LoopAnalysis, and later on in the pipeline, instcombine behaved in different ways when LoopInfo was present. So a call to a dbg.declare prevented running LoopAnalysis in GlobalOpt, which later prevented InstCombine from doing an optimization. The dbg-intrinsic-loopanalysis.ll testcase tries to expose this. Then I also noted that adding a dbg.declare actually made the existing testcase colccc_coldsites.ll generate different code, so I modified that to now test it behaves the same way with and without the dbg.declare. Reviewed By: nikic, fhahn Differential Revision: https://reviews.llvm.org/D133193
-
Sergey Kachkov authored
Use getPredicateOnEdge method if value is a non-local compare-with-a-constant instruction, that can give more precise results than getConstantOnEdge. Differential Revision: https://reviews.llvm.org/D131956
-
Andrey Tretyakov authored
Differential Revision: https://reviews.llvm.org/D132903
-
wanglei authored
The bash syntax `|&` is unsupported on other shells. Differential Revision: https://reviews.llvm.org/D133187
-
Simon Pilgrim authored
I'm not sure how much to add to the description as we've tried to allow targets to interpret the TargetCostKind enums in their own way. But we need to make it clear that certain cost kinds need to match threshold numbers used by various passes (and vice-versa when passes are determining a cost-benefit threshold). I'm not keen on the "The weighted sum of size and latency" description, but its very difficult to come up with anything else that's suitably generic (e.g. X86 will use uop counts here to easily work with LoopMicroOpBufferSize thresholds, even though high latency fdiv/fsqrt instructions still often have low uop counts). Differential Revision: https://reviews.llvm.org/D132288
-
WANG Xuerui authored
Jump tables cannot be generated yet, due to missing support for emitting local addresses. Differential Revision: https://reviews.llvm.org/D132653
-
Mats Petersson authored
This removes a bunch of duplicated code, by adding an intermediate function simplifyReduction that takes a std::function argument for the actual replacement of the code. No functional change intended. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D132588
-
Nikita Popov authored
-
Chuanqi Xu authored
-
Nicolas Vasilache authored
[mlir][Vector] Refactor vector distribution and fix an issue related to non-homogenous transfer indices. Running: `mlir-opt -test-vector-warp-distribute=rewrite-warp-ops-to-scf-if -canonicalize -verify-each=0`. Prior to this revision, IR resembling the following would be produced: ``` %4 = "vector.load"(%3, %arg0) : (memref<1x32xf32, 3>, index) -> vector<1x1xf32> ``` This fails verification since it needs 2 indices to load but only 1 is provided. Differential Revision: https://reviews.llvm.org/D133106
-
Christian Sigg authored
Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D132726
-
Andrey Tretyakov authored
Differential Revision: https://reviews.llvm.org/D132817
-
Adrian Kuegel authored
Loop variable is copied but only used as const reference.
-
Sinan Lin authored
met this issue when building llvm with config LLVM_LIBDIR_SUFFIX=64, and the installation destination of scan-build-py does not respect the given suffix. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D133160
-
Freddy Ye authored
Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D133094
-
Valentin Clement authored
This patch adds contiguity check with the runtime to avoid copyin/copyout in case the actual argument is actually contiguous. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D133097
-
Nikita Popov authored
This reverts commit cd8f3e75. As pointed out by Eli on the review, this is missing an alignment check. The value might be written at an offset.
-
Nikita Popov authored
Currently, we bail out of scalar promotion if the loop may unwind and the memory may be visible on unwind. This is because we can't insert stores of the promoted value on unwind edges. However, nowadays scalar promotion also has support for only promoting loads, while leaving stores in place. This kind of promotion is safe even in the presence of unwinding. Differential Revision: https://reviews.llvm.org/D133111
-
luxufan authored
For noop store of the form of LoadI and StoreI, An invariant should be kept is that the memory state of the related MemoryLoc before LoadI is the same as before StoreI. For this example: ``` define void @pr49927(i32* %q, i32* %p) { %v = load i32, i32* %p, align 4 store i32 %v, i32* %q, align 4 store i32 %v, i32* %p, align 4 ret void } ``` Here the definition of the store's destination is different with the definition of the load's destination, which it seems that the invariant mentioned above is broken. But the definition of the store's destination would write a value that is LoadI, actually, the invariant is still kept. So we can safely ignore it. Differential Revision: https://reviews.llvm.org/D132657 -
Lang Hames authored
Removes the stray '$' that slipped in to c1c585a0.
-
Lang Hames authored
Commit 4adc5bea moved a dependence on llvm-jitlink from SANITIZER_COMMON_LIT_TEST_DEPS to ORC_TEST_DEPS, but in doing so it moved it out from under a 'NOT COMPILER_RT_STANDALONE_BUILD ...' conditional. This led to failures on standalone builds. This commit adds the conditional to the ORC_TEST_DEPS assignment to work around the issue while we look a longer term fix. rdar://99453446
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D133171
-
Craig Topper authored
Use "SDNode" in the name is the convention for the VLMax patterns in RISCVInstrInfoVSDPatterns.td. This files use "VL".
-
Kazu Hirata authored
This patch fixes: lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.h:51:5: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D133176
-
Fangrui Song authored
-
Antonio Frighetto authored
x86 assembly syntax emission now leverages markup tags, if enabled. Differential Revision: https://reviews.llvm.org/D129869
-
Antonio Frighetto authored
AArch64 assembly syntax emission now leverages markup tags for immediates, if enabled. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D129871
-
Lang Hames authored
Saves wrap/unwrap implementers from having to use std::remove_pointer_t to get at the pointed-to type.
-
Antonio Frighetto authored
MIPS assembly syntax emission now leverages markup tags, if enabled. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D129867
-
Chenbing Zheng authored
-
Vitaly Buka authored
When we want to add instrumentation after an instruction, instrumentation still should keep debug info of the instruction. Reviewed By: kda, kstoimenov Differential Revision: https://reviews.llvm.org/D133091
-
Chenbing Zheng authored
When we do extractvalue (any_mul_with_overflow X, -1) --> (-X and icmp), which left partly failed to match vector constant with poison element. This patch try to fix it. Alive2: https://alive2.llvm.org/ce/z/2rGp_3 Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D132996
-
Vitaly Buka authored
Saves 1.8% of .text size on CTMark Reviewed By: kda Differential Revision: https://reviews.llvm.org/D133077
-
Emmmer authored
Add: - most of instructions from RVI base instructions set. - some instruction decode tests from objdump. Further work: - implement riscv imac extension. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D132789
-
Chenbing Zheng authored
-
Vitaly Buka authored
-
Katherine Rasmussen authored
Add the coarray intrinsic functions, lcobound and ucobound, to the list of intrinsics. For both of these functions, add a check to ensure that if the optional dim argument is present and statically checkable, its value is in the inclusive range of 1 and the corank of the coarray argument. In the semantics tests for lcobound and ucobound, remove the XFAIL directive, add the ERROR directives and add additional standard-conforming and non-standard conforming calls. Reviewed By: klausler, craig.rasmussen Differential Revision: https://reviews.llvm.org/D126721
-