- Jan 08, 2024
-
-
-
Hristo Hristov authored
Fixes build on Windows in C++26 mode. Reverted in: https://github.com/llvm/llvm-project/commit/40c07b559aa6ab4bac074c943967d3207bc07ae0 Original PR: https://github.com/llvm/llvm-project/pull/76632 --------- Co-authored-by:
Zingam <zingam@outlook.com>
-
- Jan 07, 2024
-
-
Amara Emerson authored
This will help re-use this code with the upcoming GlobalISel implementation of this optimization.
-
natanelh-mobileye authored
Tiny spelling mistake fixup. please review the two lines of code below to see the correctness of this PR.
-
Joseph Huber authored
Summary: This accidentally included a byte past the magic, which was out of order on big endian architectures.
-
Mark de Wever authored
-
Mark de Wever authored
The fix used macros that confuses clang-format. This is formatted with clang-format and then excluded from formatting.
-
Florian Hahn authored
As suggested as follow-up in https://github.com/llvm/llvm-project/pull/72164, manage inbounds via VPRecipeWithIRFlags. Note that in some cases we can now preserve inbounds in a few more cases.
-
Florian Hahn authored
As %B.gep.0 executes unconditionally in the latch, inbounds could be preserved in the vector version. https://alive2.llvm.org/ce/z/XWbMuD
-
Mark de Wever authored
As suggested by @philnik777 this is a better fix than 02a33b72 Fixes: https://github.com/llvm/llvm-project/issues/77123
-
Matthias Springer authored
Also improve the implementation of `findCommonDominator` (skip duplicate blocks) and extract it from `BufferPlacementTransformationBase` (so that `BufferPlacementTransformationBase` can be retired eventually).
-
Matthias Springer authored
`BufferPlacementTransformationBase::isLoop` checks if there a loop in the region branching graph of an operation. This algorithm is similar to `isRegionReachable` in the `RegionBranchOpInterface`. To avoid duplicate code, `isRegionReachable` is generalized, so that it can be used to detect region loops. A helper function `RegionBranchOpInterface::hasLoop` is added. This change also turns a recursive implementation into an iterative one, which is the preferred implementation strategy in LLVM. Also move the `isLoop` to `BufferOptimizations.cpp`, so that we can gradually retire `BufferPlacementTransformationBase`. (This is so that proper error handling can be added to `BufferViewFlowAnalysis`.)
-
Yingwei Zheng authored
This patch relaxes the one-use constraints for `icmp pred (binop X, Z), (binop Y, Z)`. It will enable more optimizations with pointer arithmetic. One example in `boost::match_results::set_size`: ``` declare void @use(i64) define i1 @src(ptr %a1, ptr %a2, ptr %add.ptr.i66, i64 %sub.ptr.rhs.cast.i) { %sub.ptr.lhs.cast.i = ptrtoint ptr %a1 to i64 %sub.ptr.rhs.cast.i = ptrtoint ptr %a2 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %sub.ptr.div.i = sdiv exact i64 %sub.ptr.sub.i, 24 call void @use(i64 %sub.ptr.div.i) %sub.ptr.lhs.cast.i.i = ptrtoint ptr %add.ptr.i66 to i64 %sub.ptr.sub.i.i = sub i64 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i %sub.ptr.div.i.i = sdiv exact i64 %sub.ptr.sub.i.i, 24 %cmp.i.not.i.i = icmp eq i64 %sub.ptr.div.i.i, %sub.ptr.div.i ret i1 %cmp.i.not.i.i } define i1 @tgt(ptr %a1, ptr %a2, ptr %add.ptr.i66, i64 %sub.ptr.rhs.cast.i) { %sub.ptr.lhs.cast.i = ptrtoint ptr %a1 to i64 %sub.ptr.rhs.cast.i = ptrtoint ptr %a2 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %sub.ptr.div.i = sdiv exact i64 %sub.ptr.sub.i, 24 call void @use(i64 %sub.ptr.div.i) %cmp.i.not.i.i = icmp eq i64 %sub.ptr.sub.i.i, %sub.ptr.sub.i ret i1 %cmp.i.not.i.i } ``` -
Bill Wendling authored
This reverts commit 0903d992. This is causing all non-Visual Studio builds fail.
-
Bill Wendling authored
Visual Studio needs the class template stuff. C:\llvm\include\llvm/Analysis/MemoryBuiltins.h(217): error C2990: 'llvm::SizeOffsetType': non-class template has already been declared as a class template C:\llvm\include\llvm/Analysis/MemoryBuiltins.h(193): note: see declaration of 'llvm::SizeOffsetType'
-
Bharathi Ramana Joshi authored
-
Abhinav271828 authored
The ParamPoint datatype has each column representing an affine function. The code for generating functions is modified to reflect this.
-
Abhinav271828 authored
We add some basic type aliases and function definitions relating to cones for Barvinok's algorithm. These include functions to get the dual of a cone and find its index.
-
cor3ntin authored
-
David Green authored
This should have been checking that the transform was valid, but used incorrect conditions letting through invalid combinations of lo/hi extracts. Hopefully fixes #76769
-
Luke Lau authored
-
Fangrui Song authored
StackSafetyAnalysis determines whether stack-allocated variables are safe from memory access bugs and allows removing certain unneeded instrumentations. (hwasan enables StackSafetyAnalysis in https://reviews.llvm.org/D108381) Test updates: * asan-stack-safety.ll: test the -asan-use-stack-safety=1 default * lifetime-uar-uas.ll: switch to an indexed store to prevent StackSafetyAnalysis from optimizing out instrumentation for %c * alloca_vla_interact.cpp: add a load to prevent StackSafetyAnalysis from optimizing out `__asan_alloca_poison` for the VLA `array` * scariness_score_test.cpp: add -asan-use-stack-safety=0 to make a load of a `__asan_poison_memory_region`-poisoned local variable fail as intended. * other .ll tests: add -asan-use-stack-safety=0 Pull Request: https://github.com/llvm/llvm-project/pull/77210
-
Fangrui Song authored
-
Alex Beloi authored
see #73359 Declarative assemblyFormat ODS is more concise and requires less boilerplate than filling out CPP interfaces. Changes: * updates the Ops defined in `SPIRVAtomicOps.td` to use assemblyFormat. * Removes print/parse from`AtomcOps.cpp` which is now generated by assemblyFormat * Adds `Trait` to verify that a pointer operand `foo`'s pointee type matches operand `bar`'s type * * Updates error message expected in tests from new Trait * Updates tests to updated format (largely using <operand> in place of "operand")
-
Craig Topper authored
This reverts commit b5de136e. Based on post commit feedback, I need to some other work before this makes sense.
-
Fangrui Song authored
-
Mircea Trofin authored
-
Maksim Levental authored
-
Arthur Eubanks authored
-
Kohei Yamaguchi authored
Closes #76106 --------- Co-authored-by:Lei Zhang <antiagainst@gmail.com>
-
Craig Topper authored
-Rename sub_32_hi to sub_gpr_odd -Add dedicated sub_gpr_even. -Rename sub_32 and sub_16 to sub_fpr32 and sub_fpr16. -Remove start offset from sub_gpr_odd. AArch64 doesn't use non-zero offset for GPR tuples so I don't think we need to. This is preparation for a RV64 GPRPair for Zacas.
-
Thorsten Schütt authored
This reverts commit 16875555.
-
- Jan 06, 2024
-
-
Shengchen Kan authored
BTW, we relax the condition for EVEX compression from ST.hasAVX512() to ST.hasEGPR() || ST.hasAVX512(). It does not have any effect now b/c no APX instruction is in the EVEX compression table so far. This patch is to extract NFC in #77065 into a separate commit.
-
Younan Zhang authored
This fixes the bug introduced by https://github.com/llvm/llvm-project/commit/6db007a0654ed7a6ed5c3aa3b61a937c19a6bc6b. We construct placeholder template arguments for template-template parameters to avoid mismatching argument substitution since they have different depths with their corresponding template arguments. In this case, ```cpp template <template <Concept C> class T> void foo(T<int>); ``` T lies at the depth 0, and C lies at 1. The corresponding argument, of which there is exactly one, int, is at depth 0. If we consider the argument as the outermost one, then we would end up substituting 'int' into the wrong parameter T. We used to perform such placeholder construction during the context walk-up. In the previous patch, we slipped through that inadvertently because we would walk up to the parent, which is precisely a FileContext for template-template parameters, after adding innermost arguments. Besides, this patch moves the sanity check up to the context switch. That way, we avoid dereferencing null pointers if ND is unspecified. Closes https://github.com/llvm/llvm-project/issues/57410. Closes https://github.com/llvm/llvm-project/issues/76604. (The case is slightly different than that in #57410. We should *not* assume the surrounding context to be a file-scope one.)
-
Shengchen Kan authored
Those "_REV" instructions should not appear before encoding optimization, while macro fusion and flag-copy lowering are before encoding optimization.
-
Shengchen Kan authored
1. Simplify getValueFromBitsInit about cast and return type 2. Remove out-of-date comments and allow memory ops in function object `IsMatch` so that we can reuse it for EVEX2Legacy compression. This patch is to extract NFC in #77065 into a separate commit.
-
Florian Hahn authored
With #70253 landed, selects for reduction results are explicitly used by ComputeReductionResult and Selects can be marked as not having side-effects again. This reverts the revert commit 17303290.
-
Qizhi Hu authored
Parameter variable which is forwarded in lambda capture list or in body by reference is reasonable and current version of this check produces false positive on these cases. This patch try to fix the [issue](https://github.com/llvm/llvm-project/issues/68105 ) Co-authored-by:
huqizhi <836744285@qq.com>
-
Abhinav271828 authored
We shift the GeneratingFunction.h header file to the include/ directory and wrap it in a `detail` namespace.
-
Shengchen Kan authored
This patch is to address my review comments in #77065 to simplify the implemention of EVEX2Legacy compression.
-