- Jul 16, 2020
-
-
Amy Kwan authored
Previously, the vins* intrinsic was incorrectly defined to have its second and third argument arguments as an i64. This patch fixes the second and third argument of the vins* instruction and intrinsic to have i32s instead. Differential Revision: https://reviews.llvm.org/D83497
-
Max Kazantsev authored
This patch adds simplification for pattern: ``` if (cond) / \ ... ... \ / p = phi [true] [false] ... br p, succ_1, succ_2 ``` If we can prove that top block's branches dominate respective inputs of a block that has a Phi with constant inputs, we can use the branch condition (maybe inverted) instead of Phi. This will make proofs of implication for further jump threading more transparent. Differential Revision: https://reviews.llvm.org/D81375 Reviewed By: xbolva00
-
Craig Topper authored
Revert "[InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms" and subsequent patches This reverts most of the following patches due to reports of miscompiles. I've left the added test cases with comments updated to be FIXMEs. 1cf6f210 [IR] Disable select ? C : undef -> C fold in ConstantFoldSelectInstruction unless we know C isn't poison. 469da663 [InstSimplify] Re-enable select ?, undef, X -> X transform when X is provably not poison 122b0640 [InstSimplify] Don't fold vectors of partial undef in SimplifySelectInst if the non-undef element value might produce poison ac0af12e [InstSimplify] Add test cases for opportunities to fold select ?, X, undef -> X when we can prove X isn't poison 9b1e9532 [InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms
-
Kiran Kumar T P authored
Summary: This patch enhances parser support for taskwait construct to OpenMP 5.0. 2.17.5 taskwait Construct !$omp taskwait [clause[ [,] clause] ... ] where clause is one of the following: depend([depend-modifier,]dependence-type : locator-list) The patch includes code changes and testcase modifications. Reviewed By: Valentin Clement, Kiran Chandramohan Differential Revision: https://reviews.llvm.org/D82255 -
Aden Grue authored
This also fixes the outdated use of `n_views` in the documentation. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D83795
-
George Rokos authored
-
Carl Ritson authored
Using s_waitcnt_depctr 0xffe3 is potentially faster than v_nop. Reviewed By: rampitec, foad Differential Revision: https://reviews.llvm.org/D83872
-
Ryan Prichard authored
Previously, for large-enough values, getSLEB128 would attempt to shift a signed int in the range [0..0x7f] by 28, 35, 42... bits, which is undefined behavior and likely to fail. Avoid shifting (-1ULL) by 70 for large values. e.g. For INT64_MAX, the last two bytes will be: - 0x7f [bit==56] - 0x00 [bit==63] Differential Revision: https://reviews.llvm.org/D83742
-
Ryan Prichard authored
- For CIE version 1 (e.g. in DWARF 2.0.0), the return_address_register field is a ubyte [0..255]. - For CIE version 3 (e.g. in DWARF 3), the field is instead a ULEB128 constant. Previously, libunwind accepted a CIE version of 1 or 3, but always parsed the field as ULEB128. Clang always outputs CIE version 1 into .eh_frame. (It can output CIE version 3 or 4, but only into .debug_frame.) Differential Revision: https://reviews.llvm.org/D83741
-
George Rokos authored
This patch implements the code generation to use OpenMP 5.0 declare mapper (a.k.a. user-defined mapper) constructs. Patch written by Lingda Li. Differential Revision: https://reviews.llvm.org/D67833
-
George Rokos authored
Libomptarget patch adding runtime support for "declare mapper". Patch co-developed by Lingda Li and George Rokos. Differential revision: https://reviews.llvm.org/D68100
-
Quentin Colombet authored
When we calculate the weight of a live-interval, add some code to check if the original live-interval was markied as not spillable and if so, progagate that information down to the new interval. Previously we would just recompute a weight for the new interval, thus, we could in theory just spill live-intervals marked as not spillable by just splitting them. That goes against the spirit of a non-spillable live-interval. E.g., previously we could do: v1 = // v1 must not be spilled ... = v1 Split: v1 = // v1 must not be spilled ... v2 = v1 // v2 can be spilled ... v3 = v2 // v3 can be spilled = v3 There's no test case for that one as we would need to split a non-spillable live-interval without using LiveRangeEdit to see this happening. RegAlloc inserts non-spillable intervals only as part of the spilling mechanism, thus at this point the intervals are not splittable anymore. On top of that, RegAlloc uses the LiveRangeEdit API, w...
-
dfukalov authored
Summary: If result of fmul(b,c) has one use, in almost all cases (except denormals are IEEE) the pair of operations will be fused in one fma/mad/mac/etc. Reviewers: rampitec Reviewed By: rampitec Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits, kerbowa Tags: #llvm Differential Revision: https://reviews.llvm.org/D83919
-
Roman Lebedev authored
Likewise, just use the builder pattern. Taking multiple params is unmaintainable.
-
Jonas Devlieghere authored
Reproducers only support synchronous mode.
-
Adrian Prantl authored
-
Muhammad Omair Javaid authored
Summary: test_terminate_commands is flaky on LLDB Arm buildbot as well. It was already being skipped for aarch64. I am going to mark it skipped for Arm too. Tags: #lldb Differential Revision: https://reviews.llvm.org/D81978
-
Roman Lebedev authored
Taking so many parameters is simply unmaintainable. We don't want to include the entire llvm/Transforms/Utils/Local.h into llvm/Transforms/Scalar.h so i've split SimplifyCFGOptions into it's own header.
-
Roman Lebedev authored
Taking that long list of parameters is already simply unmaintainable.
-
Craig Topper authored
[X86] Teach assembler parser to accept lsl and lar with a 64 or 32 source register when the destination is a 64 register. Previously we only accepted a 32-bit source with a 64-bit dest. Accepting 64-bit as well is more consistent with gas behavior. I think maybe we should accept 16 bit register as well, but I'm not sure.
-
Tim Keith authored
When an intrinsic is referenced in a module scope, a symbol for it is added. When that module is USEd, the intrinsic should not be included. Otherwise we can get ambiguous reference errors with the same intrinsic coming from two difference modules. Differential Revision: https://reviews.llvm.org/D83905
-
Akira Hatanaka authored
llvm function is marked nounwind This fixes cases where an invoke is emitted, despite the called llvm function being marked nounwind, because ConstructAttributeList failed to add the attribute to the attribute list. llvm optimization passes turn invokes into calls and optimize away the exception handling code, but it's better to avoid emitting the code in the front-end if the called function is known not to raise an exception. Differential Revision: https://reviews.llvm.org/D83906
-
Roman Lebedev authored
[NFC][SimplifyCFG] HoistThenElseCodeToIf(): after hoisting terminator, do return Changed, not just true Otherwise, if Changed was still false before that, we would not account for that hoist in NumHoistCommonCode statistic.
-
Stephen Neuendorffer authored
Some dialects have semantics which is not well represented by common SSA structures with dominance constraints. This patch allows operations to declare the 'kind' of their contained regions. Currently, two kinds are allowed: "SSACFG" and "Graph". The only difference between them at the moment is that SSACFG regions are required to have dominance, while Graph regions are not required to have dominance. The intention is that this Interface would be generated by ODS for existing operations, although this has not yet been implemented. Presumably, if someone were interested in code generation, we might also have a "CFG" dialect, which defines control flow, but does not require SSA. The new behavior is mostly identical to the previous behavior, since registered operations without a RegionKindInterface are assumed to contain SSACFG regions. However, the behavior has changed for unregistered operations. Previously, these were checked for dominance, however the new behavior allows dominance violations, in order to allow the processing of unregistered dialects with Graph regions. One implication of this is that regions in unregistered operations with more than one op are no longer CSE'd (since it requires dominance info). I've also reorganized the LangRef documentation to remove assertions about "sequential execution", "SSA Values", and "Dominance". Instead, the core IR is simply "ordered" (i.e. totally ordered) and consists of "Values". I've also clarified some things about how control flow passes between blocks in an SSACFG region. Control Flow must enter a region at the entry block and follow terminator operation successors or be returned to the containing op. Graph regions do not define a notion of control flow. see discussion here: https://llvm.discourse.group/t/rfc-allowing-dialects-to-relax-the-ssa-dominance-condition/833/53 Differential Revision: https://reviews.llvm.org/D80358
-
Roman Lebedev authored
I.e. out of all the times HoistThenElseCodeToIf() was called, how many times did it actually hoist something?
-
Roman Lebedev authored
-
Roman Lebedev authored
[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): count number of instruction "blocks" actually sunk Out of all the times the function was called, how many times did we actually sink anything?
-
Roman Lebedev authored
[NFC][SimplifyCFG] SinkCommonCodeFromPredecessors(): add debug output when failing to actually sink instr
-
Roman Lebedev authored
If we can't sink even one instruction, early return, to increase readability.
-
Roman Lebedev authored
It really counts instructions added into common block, not number of instruction groups sunk.
-
Roman Lebedev authored
-
Jared Wyles authored
Summary: This adds the basic support for GOT in elf x86. Was able to just get away using the macho code by generalising the edges. There will be a follow up patch to turn that into a generic utility for both of the x86 and Mach-O code. This patch also lands support for relocations relative to symbol. Reviewers: lhames Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83748
-
Mehdi Amini authored
This came up in a recent review, someone was wondering were was this all documented and I couldn't find a reference to provide. Differential Revision: https://reviews.llvm.org/D83816
-
Mehdi Amini authored
Like most readability rules, it isn't absolute and there is a matter of taste to it. I think more recent part of the project may be more consistent in the current application of the guideline. I suspect sources like mlir/lib/Dialect/StandardOps/IR/Ops.cpp may be examples of this at the moment. Differential Revision: https://reviews.llvm.org/D82594
-
Jonas Devlieghere authored
Remove custom tearDownHooks from GDB Remote tests as we now cleanup subprocesses unconditionally. This also changes the termination order to be the reverse of the creation order. I don't think anything is relying on that right now, but it better fits the setup/teardown paradigm.
-
Abhina Sreeskantharajan authored
Summary: This PR contains a build failure fix that occurs on both AIX and z/OS as a result of this commit https://reviews.llvm.org/rG670915094462d831e3733e5b01a76471b8cf6dd8. Reviewers: uweigand, Kai, hubert.reinterpretcast, daltenty, lhames Reviewed By: Kai, hubert.reinterpretcast, daltenty Subscribers: SeanP, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83889
-
Tim Keith authored
A SAVE statement with no entity list applies the SAVE attribute only to the entities that it is allowed on. We were applying it to automatic data objects and reporting an error that they can't have SAVE. The fix is to change `DeclarationVisitor::CheckSaveAttr` to check for automatic objects. That controls both checking and setting the attribute. This allows us to remove the check from `CheckSpecExpr` (along with `symbolBeingChecked_`). Also, it was only called on constant objects so the non-const overload can be eliminated. The check in `CheckSpecExpr` is replaced by an explicit check for automatic objects in modules. This caught an error in modfile03.f90 so that part of the test was eliminated. Differential Revision: https://reviews.llvm.org/D83899
-
Hongtao Yu authored
Unrolling a loop with compile-time unknown trip count results in a remainder loop. The remainder loop executes the remaining iterations of the original loop when the original trip count is not a multiple of the unroll factor. For better profile counts maintenance throughout the optimization pipeline, I'm assigning an artificial weight to the latch branch of the remainder loop. A remainder loop runs up to as many times as the unroll factor subtracted by 1. Therefore I'm assigning the maximum possible trip count as the back edge weight. This should be more accurate than the default non-profile weight, which assumes the back edge runs much more frequently than the exit edge. Differential Revision: https://reviews.llvm.org/D83187
-
Alexey Bataev authored
Summary: If user-defined reductions with the initializer are used with classes, the compiler misses the constructor call when trying to create a private copy of the reduction variable. Reviewers: jdoerfert Subscribers: cfe-commits, yaxunl, guansong, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D83334
-
dfukalov authored
Summary: llc reports `fp32-denormals` is not recognized. I guess it was intended to be `-denormal-fp-math-f32={preserve-sign|ieee} -mattr=+mad-mac-f32-insts` Reviewers: rampitec Reviewed By: rampitec Subscribers: jvesely, nhaehnle, llvm-commits, kerbowa Tags: #llvm Differential Revision: https://reviews.llvm.org/D83883
-