- Dec 21, 2022
-
-
Hans Wennborg authored
This caused lld on mac to assert when building instrumented clang (or instrumented code in general). See comment on the code review for reproducer. > In many cases, we can use an alias to avoid a symbolic relocations, > instead of using the public, interposable symbol. When the instrumented > function is in a COMDAT, we can use a hidden alias, and still avoid > references to discarded sections. > > New compiler-rt tests are Linux only for now. > > Previous versions of this patch allowed the compiler to name the > generated alias, but that would only be valid when the functions were > local. Since the alias may be used across TUs we use a more > deterministic naming convention, and add a `.local` suffix to the alias > name just as we do for relative vtables aliases. > > Reviewed By: phosek > > Differential Revision: https://reviews.llvm.org/D137982 This reverts commit c42e50fe.
-
Mirko Brkusanin authored
Differential Revision: https://reviews.llvm.org/D140416
-
Peter Waller authored
If a load is consumed by a single splat, don't consider indexed loads. This is an alternative implementation to D138581. Depends on D139637. Differential Revision: https://reviews.llvm.org/D139850
-
Alexey Bataev authored
Added BaseShuffleAnalysis as a base class for ShuffleInstructionBuilder and integrated shuffle logic from shuffles for externally used scalars into this class. This class is used as the main container that implements smart shuffle instruction builder logic. ShuffleInstructionBuilder uses this logic. ShuffleInstructionBuilder is also used in building of the shuffle for the externally used scalars instead of lambdas, which are now part of BaseShuffleAnalysis class. Differential Revision: https://reviews.llvm.org/D140100
-
Paul Robinson authored
Differential Revision: https://reviews.llvm.org/D139869
-
Florian Hahn authored
Code generation now uses the start VPValue of induction recipes. This makes it possible to adjust the start value of the epilogue vector loop to use the 'resume' value of the main vector loop. Fixes #59459. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D92132
-
Yingchi Long authored
Reproducer: ; RUN: opt -S -jump-threading < %s define void @test() { entry: br i1 false, label %loop, label %exit loop: %bool = phi i1 [ %xor, %loop.latch ], [ false, %entry ] %cmp = icmp eq i16 0, 1 %xor = xor i1 %cmp, %bool br i1 %bool, label %loop.latch, label %exit loop.latch: %dummy = phi i16 [ 0, %loop ] br label %loop exit: ret void } On this occassion, phi node %bool is actually %xor, and doing substitution causes assertion failure. Fixes: https://github.com/llvm/llvm-project/issues/58812 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D139783 -
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Aliia Khasanova authored
Add a shortened printing/parsing form for linalg.map and linalg.reduce. END_PUBLIC Differential Revision: https://reviews.llvm.org/D140406
-
Paul Robinson authored
-
Matt Arsenault authored
Fixes assertion.
-
Matt Arsenault authored
-
Matt Arsenault authored
Fixes assert/verifier error with AVR.
-
Florian Hahn authored
-
Paul Robinson authored
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Ivan Butygin authored
This is an alternative to https://reviews.llvm.org/D138761 . Instead of adding ad-hoc attributes to existing `LocalAliasAnalysis`, expose `aliasImpl` method so user can override it. Differential Revision: https://reviews.llvm.org/D140348
-
Alexey Lapshin authored
This patch adds handling of debug_macinfo/debug_macro tables to the DWARFLinker. It uses already existing code for reading tables from DWARFDebugMacro.h. It adds new code writing tables into the DwarfStreamer::emitMacroTables. Differential Revision: https://reviews.llvm.org/D140223
-
Ben Shi authored
Reviewed By: Miss_Grape, aykevl Differential Revision: https://reviews.llvm.org/D139908
-
Evgenii Kudriashov authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D139991
-
Matthias Springer authored
TensorCopyInsertion inserts bufferization.alloc_tensor ops in case of RaW conflicts. If such a tensor is dynamically shaped, tensor.dim ops are inserted. There is an optimization for ops such as tensor.extract_slice: A copy of the result is created instead of the operand. Afterwards, all uses of the result are updated. E.g.: ``` %0 = tensor.extract_slice ... : tensor<?xf32> to tensor<?xf32> %1 = tensor.dim %0, %c0 : tensor<?xf32> %2 = bufferization.alloc_tensor(%dim) : tensor<?xf32> ``` All uses of %0, except for tensor.dim and bufferization.alloc_tensor (if any), should be replaced. Before this change, the use in tensor.dim was also replaced, resulting in IR that had a dominance error. Note: There is no test case for this fix because the bug cannot be triggered with tensor.extract_slice, which implements an interface to reify result shapes. This bug appeared in an external project with a tensor.extract_slice-like op that does not implement that interface, in which case tensor.dim ops must be created. We do not have such an op in MLIR to trigger this bug. Differential Revision: https://reviews.llvm.org/D140471
-
Nikita Popov authored
-
Nikita Popov authored
-
Ties Stuij authored
If feature CSSC is available, CTTZ intrinsics are lowered using the CTZ instruction when using GlobalIsel. spec: https://developer.arm.com/documentation/ddi0602/2022-09/Base-Instructions/CTZ--Count-Trailing-Zeros- Reviewed By: paquette Differential Revision: https://reviews.llvm.org/D139418
-
Elena Lepilkina authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D140206
-
Elena Lepilkina authored
Precommit test for https://reviews.llvm.org/D140206
-
bipmis authored
Fix the regression in the reported test case lagarith-preproc.c. Specfic to the incorrect umsubl generation. Differential Revision: https://reviews.llvm.org/D139411
-
Max Kazantsev authored
[SCEV] Help getLoopInvariantExitCondDuringFirstIterations deal with complex `umin` exit counts. PR59615 Recent improvements in symbolic exit count computation revealed some problems with SCEV's ability to find invariant predicate during first iterations. Ultimately it is based on its ability to prove some facts for value on the last iteration. This last value, when it includes `umin` as part of exit count, isn't always simplified enough. The motivating example is following: https://github.com/llvm/llvm-project/issues/59615 Could not prove: ``` Pred = 36, LHS = (-1 + (-1 * (2147483645 umin (-1 + %var)<nsw>))<nsw> + %var), RHS = %var FoundPred = 36, FoundLHS = {1,+,1}<nuw><nsw><%bb3>, FoundRHS = %var ``` Can prove: ``` Pred = 36, LHS = (-1 + (-1 * (-1 + %var)<nsw>)<nsw> + %var), RHS = %var FoundPred = 36, FoundLHS = {1,+,1}<nuw><nsw><%bb3>, FoundRHS = %var ``` Here ` (2147483645 umin (-1 + %var)<nsw>)` is exit count composed of two parts from two different exits: `2147483645 ` and `(-1 + %var)<nsw>`. When it was only one (latter) analyzeable exit, for it everything was easily provable. Unfortunately, in general case `umin` in one of `add`'s operands doesn't guarantee that the whole sum reduces, especially in presence of negative steps and lack of `nuw`. I don't think there is a generic legal way to somehow play around this `umin`. So the ad-hoc solution is following: if we failed to find an equivalent predicate that is invariant during first `MaxIter` iterations, and `MaxIter = umin(a, b, c...)`, try to find solution for at least one of `a`, `b`, `c`... Because they all are `uge` than `MaxIter`, whatever is true during `a (b, c)` iterations is also true during `MaxIter` iterations. Differential Revision: https://reviews.llvm.org/D140456 Reviewed By: nikic
-
Ties Stuij authored
changes: - BLX: The Arm architecture versions that support the branch and link instruction (BLX), can rewrite BLs in place when a state change from Arm<->Thumb is required. Armv4T does not have BLX and so needs thunks for state changes. - v4T Thumb long branches needed their own thunk. We could have used the v6M implementation, but v6M doesn't have Arm state and must resolve to rather inefficient stack reshuffling. We also can't reuse v7 thumb thunks as they use MOVV/MOVT, which wasn't available yet for v4T. - Remove the `lack of BLX' warning. LLVM only supports Arm Architecture versions upwards of v4, which we now all support in LLD. - renamed existing thunks to better reflect their use: ARMV5ABSLongThunk -> ARMV5LongLdrPcThunk, ARMV5PILongThunk -> ARMV4PILongThunk - removed isCompatibleWith method from ARMV5ABSLongThunk and ARMV5PILongThunk, as they were identical to the ARMThunk parent class implementation. Support for (efficient) position independent thunks for v4T will be added in a follow-up patch, including possible related thunk renaming and code comment cleanup. Reviewed By: MaskRay, peter.smith Differential Revision: https://reviews.llvm.org/D139888
-
Christudasan Devadasan authored
This reverts commit 40ba0942.
-
Jay Foad authored
Change EmitCopyFromReg to check all users of cloned nodes (as well as non-cloned nodes) instead of assuming that they all copy the defined value back to the same physical register. This partially reverts 968e2e7b (svn r62356) which claimed: CreateVirtualRegisters does trivial copy coalescing. If a node def is used by a single CopyToReg, it reuses the virtual register assigned to the CopyToReg. This won't work for SDNode that is a clone or is itself cloned. Disable this optimization for those nodes or it can end up with non-SSA machine instructions. This is true for CreateVirtualRegisters but r62356 also updated EmitCopyFromReg where it is not true. Firstly EmitCopyFromReg only coalesces physical register copies, so the concern about SSA form does not apply. Secondly making the loop over users in EmitCopyFromReg conditional on `!IsClone && !IsCloned` breaks the handling of cloned nodes, because it leaves MatchReg set to true by default, so it assumes that all users will copy the defined value back to the same physical register instead of actually checking. Differential Revision: https://reviews.llvm.org/D140417
-
Jay Foad authored
-
Nikita Popov authored
We were copying it into the installed version of the directory, but not into the one in the build directory. Because of that it was not directly usable as a cmake module by subprojects that also use the driver functionality.
-
Sameer Sahasrabuddhe authored
AAPotentialConstantValues now works for PHI and Load by simply examinig AAPotentialValues for the instruction itself. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D140371
-
Matthias Springer authored
Static op verification cannot detect cases where an op is valid at compile time but may be invalid at runtime. An example of such an op is `memref::ExpandShapeOp`. Invalid at compile time: `memref.expand_shape %m [[0, 1]] : memref<11xf32> into memref<2x5xf32>` Valid at compile time (because we do not know any better): `memref.expand_shape %m [[0, 1]] : memref<?xf32> into memref<?x5xf32>`. This op may or may not be valid at runtime depending on the runtime shape of `%m`. Invalid runtime ops such as the one above are hard to debug because they can crash the program execution at a seemingly unrelated position or (even worse) compute an invalid result without crashing. This revision adds a new op interface `RuntimeVerifiableOpInterface` that can be implemented by ops that provide additional runtime verification. Such runtime verification can be computationally expensive, so it is only generated on an opt-in basis by running `-generate-runtime-verification`. A simple runtime verifier for `memref::ExpandShapeOp` is provided as an example. Differential Revision: https://reviews.llvm.org/D138576
-
Dmitry Preobrazhensky authored
-
Piotr Sobczak authored
Refactor code to reduce code duplication and improve maintainability. - Extract BUF_Pseudo common base class - Refactor getMUBUFInsDA - Refactor getMUBUFAtomicInsDA - Refactor getMTBUFInsDA - Refactor getMUBUFAsmOps - Refactor getMTBUFAsmOps Differential Revision: https://reviews.llvm.org/D140410
-
Juan Manuel MARTINEZ CAAMAÑO authored
Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D140195
-
Balázs Kéri authored
Reviewed By: gamesh411 Differential Revision: https://reviews.llvm.org/D136848
-
LiDongjin authored
Differential Revision: https://reviews.llvm.org/D98101 Co-authored-by:
luxufan <luxufan@iscas.ac.cn>
-