- May 20, 2020
-
-
Roman Lebedev authored
---------------------------------------- define i4 @negate_extractelement(<2 x i4> %x, i32 %y, i4 %z) { %0: %t0 = sub <2 x i4> { 0, 0 }, %x call void @use_v2i4(<2 x i4> %t0) %t1 = extractelement <2 x i4> %t0, i32 %y %t2 = sub i4 %z, %t1 ret i4 %t2 } => define i4 @negate_extractelement(<2 x i4> %x, i32 %y, i4 %z) { %0: %t0 = sub <2 x i4> { 0, 0 }, %x call void @use_v2i4(<2 x i4> %t0) %t1.neg = extractelement <2 x i4> %x, i32 %y %t2 = add i4 %t1.neg, %z ret i4 %t2 } Transformation seems to be correct!
-
Roman Lebedev authored
-
Louis Dionne authored
Tests for `std::system_error` constructor marked as slightly non-portable. One (but not the only one) reason for such non-portability is that these tests assume the default locale to be set to "C" (or "POSIX"). However, the default locale for the process depends on OS and environment. This patch adds explicit setting of the correct locale expected by the tests. Thanks to Andrey Maksimov for the patch. Differential Revision: https://reviews.llvm.org/D72456
-
aartbik authored
Summary: Fixes issue https://bugs.llvm.org/show_bug.cgi?id=45995 Reviewers: mehdi_amini, nicolasvasilache, reidtatge, craig.topper, ftynse, bkramer Reviewed By: craig.topper Subscribers: RKSimon, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80231
-
Jan Wilken Dörrie authored
This change removes both the member function swap and the free function overload of swap for std::span. While swap is a member and overloaded for every other container in the standard library [1], it is neither a member function nor a free function overload for std::span [2]. Thus the corresponding implementation should be removed. [1] https://eel.is/c++draft/libraryindex#:swap [2] https://eel.is/c++draft/span.overview Differential Revision: https://reviews.llvm.org/D69827
-
Arthur Eubanks authored
See https://reviews.llvm.org/D74651 for the preallocated IR constructs and LangRef changes. In X86TargetLowering::LowerCall(), if a call is preallocated, record each argument's offset from the stack pointer and the total stack adjustment. Associate the call Value with an integer index. Store the info in X86MachineFunctionInfo with the integer index as the key. This adds two new target independent ISDOpcodes and two new target dependent Opcodes corresponding to @llvm.call.preallocated.{setup,arg}. The setup ISelDAG node takes in a chain and outputs a chain and a SrcValue of the preallocated call Value. It is lowered to a target dependent node with the SrcValue replaced with the integer index key by looking in X86MachineFunctionInfo. In X86TargetLowering::EmitInstrWithCustomInserter() this is lowered to an %esp adjustment, the exact amount determined by looking in X86MachineFunctionInfo with the integer index key. The arg ISelDAG node takes in a chain, a SrcValue of the preallocated call Value, and the arg index int constant. It produces a chain and the pointer fo the arg. It is lowered to a target dependent node with the SrcValue replaced with the integer index key by looking in X86MachineFunctionInfo. In X86TargetLowering::EmitInstrWithCustomInserter() this is lowered to a lea of the stack pointer plus an offset determined by looking in X86MachineFunctionInfo with the integer index key. Force any function containing a preallocated call to use the frame pointer. Does not yet handle a setup without a call, or a conditional call. Does not yet handle musttail. That requires a LangRef change first. Tried to look at all references to inalloca and see if they apply to preallocated. I've made preallocated versions of tests testing inalloca whenever possible and when they make sense (e.g. not alloca related, inalloca edge cases). Aside from the tests added here, I checked that this codegen produces correct code for something like ``` struct A { A(); A(A&&); ~A(); }; void bar() { foo(foo(foo(foo(foo(A(), 4), 5), 6), 7), 8); } ``` by replacing the inalloca version of the .ll file with the appropriate preallocated code. Running the executable produces the same results as using the current inalloca implementation. Reverted due to unexpectedly passing tests, added REQUIRES: asserts for reland. Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77689
-
Jonas Devlieghere authored
This makes it possible to instrument the call for the reproducers. This fixes TestStructuredDataAPI.py with reproducer replay. Differential revision: https://reviews.llvm.org/D80312
-
Arthur Eubanks authored
This reverts commit 810567dc. Some tests are unexpectedly passing
-
Amy Huang authored
-
Jonas Devlieghere authored
-
Zola Bridges authored
Summary: Asm goto is not supported by SLH. Warn if an instance of asm goto is detected while SLH is enabled. Test included. Reviewed By: jyu2 Differential Revision: https://reviews.llvm.org/D79743
-
Sanjay Patel authored
-
Hiroshi Yamauchi authored
Summary: Rename 'i' to 'I'. Factor out the optional field handling to getOptionalVal(). Split out of D79951. Reviewers: davidxl Subscribers: eraman, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80230
-
Jonas Devlieghere authored
There appears to be consensus in D80165 that this is the desired behavior and I personally agree. Differential revision: https://reviews.llvm.org/D80226
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Arthur Eubanks authored
See https://reviews.llvm.org/D74651 for the preallocated IR constructs and LangRef changes. In X86TargetLowering::LowerCall(), if a call is preallocated, record each argument's offset from the stack pointer and the total stack adjustment. Associate the call Value with an integer index. Store the info in X86MachineFunctionInfo with the integer index as the key. This adds two new target independent ISDOpcodes and two new target dependent Opcodes corresponding to @llvm.call.preallocated.{setup,arg}. The setup ISelDAG node takes in a chain and outputs a chain and a SrcValue of the preallocated call Value. It is lowered to a target dependent node with the SrcValue replaced with the integer index key by looking in X86MachineFunctionInfo. In X86TargetLowering::EmitInstrWithCustomInserter() this is lowered to an %esp adjustment, the exact amount determined by looking in X86MachineFunctionInfo with the integer index key. The arg ISelDAG node takes in a chain, a SrcValue of the preallocated call Value, and the arg index int constant. It produces a chain and the pointer fo the arg. It is lowered to a target dependent node with the SrcValue replaced with the integer index key by looking in X86MachineFunctionInfo. In X86TargetLowering::EmitInstrWithCustomInserter() this is lowered to a lea of the stack pointer plus an offset determined by looking in X86MachineFunctionInfo with the integer index key. Force any function containing a preallocated call to use the frame pointer. Does not yet handle a setup without a call, or a conditional call. Does not yet handle musttail. That requires a LangRef change first. Tried to look at all references to inalloca and see if they apply to preallocated. I've made preallocated versions of tests testing inalloca whenever possible and when they make sense (e.g. not alloca related, inalloca edge cases). Aside from the tests added here, I checked that this codegen produces correct code for something like ``` struct A { A(); A(A&&); ~A(); }; void bar() { foo(foo(foo(foo(foo(A(), 4), 5), 6), 7), 8); } ``` by replacing the inalloca version of the .ll file with the appropriate preallocated code. Running the executable produces the same results as using the current inalloca implementation. Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77689
-
Jonas Devlieghere authored
Add reproducer support to PlatformRemoteGDBServer. The logic is essentially the same as for ProcessGDBRemote. During capture we record the GDB packets and during replay we connect to a replay server. This fixes TestPlatformClient.py when run form a reproducer. Differential Revision: https://reviews.llvm.org/D80224
-
MaheshRavishankar authored
and Consumer is a GenericOp. Differential Revision: https://reviews.llvm.org/D79838
-
Jonas Devlieghere authored
Skip tests or part thereof that are not supposed to work with replay.
-
Matt Arsenault authored
This was replicating the low bits into the high bits for G_ZEXT, rather than using 0.
-
Nicolas Vasilache authored
Summary: Previously, the only support partial lowering from vector transfers to SCF was going through loops. This requires a dedicated allocation and extra memory roundtrips because LLVM aggregates cannot be indexed dynamically (for more details see the [deep-dive](https://mlir.llvm.org/docs/Dialects/Vector/#deeperdive)). This revision allows specifying full unrolling which removes this additional roundtrip. This should be used carefully though because full unrolling will spill, negating the benefits of removing the interim alloc in the first place. Proper heuristics are left for a later time. Differential Revision: https://reviews.llvm.org/D80100
-
Alexey Bataev authored
-
Alex Zinenko authored
The SingleBlockImplicitTerminator op trait provides a function `ensureRegionTerminator` that injects an appropriate terminator into the block if necessary, which is used during operation constructing and parsing. Currently, this function directly modifies the IR using low-level APIs on Operation and Block. If this function is called from a conversion pattern, these manipulations are not reflected in the ConversionPatternRewriter and thus cannot be undone or, worse, lead to tricky memory errors and malformed IR. Change `ensureRegionTerminator` to take an instance of `OpBuilder` instead of `Builder`, and use it to construct the block and the terminator when required. Maintain overloads taking an instance of `Builder` and creating a simple `OpBuilder` to use in parsers, which don't have an `OpBuilder` and cannot interact with the dialect conversion mechanism. This change was one of the reasons to make `<OpTy>::build` accept an `OpBuilder`. Differential Revision: https://reviews.llvm.org/D80138
-
Alex Zinenko authored
Originally, the SCFToStandard conversion only declared Ops from the Standard dialect as legal after conversion. This is undesirable as it would fail the conversion if the SCF ops contained ops from any other dialect. Furthermore, this would be problematic for progressive lowering of `scf.parallel` to `scf.for` after `ensureRegionTerminator` is made aware of the pattern rewriting infrastructure because it creates temporary `scf.yield` operations declared illegal. Change the legalization target to declare any op other than `scf.for`, `scf.if` and `scf.parallel` legal. Differential Revision: https://reviews.llvm.org/D80137
-
Alex Zinenko authored
Multiple places in the code base were erasing Blocks or operations in them using in-place modifications (`Block::erase` or `Block::clear`) unknown to ConversionPatternRewriter. These operations could not be undone if the pattern failed and could lead to inconsistent in-memory state of the IR with dangling pointers. Use `ConversionPatternRewriter::eraseOp` and `::eraseBlock` instead. Differential Revision: https://reviews.llvm.org/D80136
-
Alex Zinenko authored
PatternRewriter has support for erasing a Block from its parent region, but this feature has not been implemented for ConversionPatternRewriter that needs to keep track of and be able to undo block actions. Introduce support for undoing block erasure in the ConversionPatternRewriter by marking all the ops it contains for erasure and by detaching the block from its parent region. The detached block is stored in the action description and is not actually deleted until the rewrites are applied. Differential Revision: https://reviews.llvm.org/D80135
-
Alex Zinenko authored
Dialect conversion infrastructure may roll back op creation by erasing the operations in the reverse order of their creation. While this guarantees uses of values will be deleted before their definitions, this does not guarantee that a parent operation will not be deleted before its child. (This may happen in case of block inlining or if child operations, such as terminators, are created in the parent's `build` function before the parent itself.) Handle the parent/child relationship between ops by removing all child ops from the blocks before erasing the parent. The child ops remain live, detached from a block, and will be safely destroyed in their turn, which may come later than that of the parent. Differential Revision: https://reviews.llvm.org/D80134
-
Alex Zinenko authored
When creating temporary `scf.for` loops in `toy.print` lowering, the block insertion point was erronously set up to the beginning of the block rather than to its end, contradicting the comment just above the insertion point change. The code was nevertheless operational because `scf.for` was setting up its `scf.yield` terminator in an opaque to the pattern rewriting infrastructure way. Now that it is about to change, the problem would have been exposed and lead to conversion failures. Differential Revision: https://reviews.llvm.org/D80133
-
Nicolas Vasilache authored
Summary: This revision trims unnecessary complexity. Differential Revision: https://reviews.llvm.org/D80290
-
Nicolas Vasilache authored
Summary: This revision refactors the Linalg tiling pass to be written as pattern applications and retires the use of the folder in Linalg tiling. In the early days, tiling was written as a pass that would create (partially) folded and canonicalized operations on the fly for better composability. As this evolves towards composition of patterns, the pass-specific folder is counter-productive and is retired. The tiling options struct evolves to take a tile size creation function which allows materializing tile sizes on the fly (in particular constant tile sizes). This plays better with folding and DCE. With the folder going away in Tiling, the check on whether subviews are the same in linalg fusion needs to be more robust. This revision also implements such a check. In the current form, there are still some canonicalizations missing due to AffineMin/Max ops fed by scf::ForOp. These will be improved at a later time. Differential Revision: https://reviews.llvm.org/D80267
-
Simon Pilgrim authored
MachineMemOperand.h - replace Type.h with full GlobalValue.h include to fix -Wundefined-inline warnings.
-
Simon Pilgrim authored
-
Jay Foad authored
-
Raphael Isemann authored
-
Melanie Blower authored
[clang] FastMathFlags.allowContract should be initialized only from FPFeatures.allowFPContractAcrossStatement Summary: Fix bug introduced in D72841 adding support for pragma float_control Reviewers: rjmccall, Anastasia Differential Revision: https://reviews.llvm.org/D79903
-
Alex Zinenko authored
The dialect and conversions from/to it were renamed in previous commits. Differential Revision: https://reviews.llvm.org/D80216
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Exposes an implicit dependency on Type.h in MachineMemOperand.h
-
Simon Pilgrim authored
MSVC was warning that the definition for the MachineMemOperand stream handler doesn't exist.
-