#
4855534d |
| 27-May-2020 |
Vedant Kumar <vsk@apple.com> |
[MachineVerifier] Verify that a DBG_VALUE has a debug location
Summary: Verify that each DBG_VALUE has a debug location. This is required by LiveDebugValues, and perhaps by other late passes.
There
[MachineVerifier] Verify that a DBG_VALUE has a debug location
Summary: Verify that each DBG_VALUE has a debug location. This is required by LiveDebugValues, and perhaps by other late passes.
There's an exception for tests: lots of tests use a two-operand form of DBG_VALUE for convenience. There's no reason to prevent that.
This is an extension of D80665, but there's no dependency.
Reviewers: aprantl, jmorse, davide, chrisjackson
Subscribers: hiraditya, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80670
show more ...
|
#
8bc03d21 |
| 15-May-2020 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
GlobalISel: Merge G_PTR_MASK with llvm.ptrmask intrinsic
Confusingly, these were unrelated and had different semantics. The G_PTR_MASK instruction predates the llvm.ptrmask intrinsic, but has a diff
GlobalISel: Merge G_PTR_MASK with llvm.ptrmask intrinsic
Confusingly, these were unrelated and had different semantics. The G_PTR_MASK instruction predates the llvm.ptrmask intrinsic, but has a different format. G_PTR_MASK only allows clearing the low bits of a pointer, and only a constant number of bits. The ptrmask intrinsic allows an arbitrary mask. Replace G_PTR_MASK to match the intrinsic.
Only selects the cases that look like the old instruction. More work is needed to select the general case. Also new legalization code is still needed to deal with the case where the incoming mask size does not match the pointer size, which has a specified behavior in the langref.
show more ...
|
#
aedb6615 |
| 15-May-2020 |
Kang Zhang <shkzhang@cn.ibm.com> |
[MachineVerifier] Use the for_range loop to instead llvm::any_of
Summary: In the patch D78849, it uses llvm::any_of to instead of for loop to simplify the function addRequired(). It's obvious that a
[MachineVerifier] Use the for_range loop to instead llvm::any_of
Summary: In the patch D78849, it uses llvm::any_of to instead of for loop to simplify the function addRequired(). It's obvious that above code is not a NFC conversion. Because any_of will return if any addRequired(Reg) is true immediately, but we want every element to call addRequired(Reg).
This patch uses for_range loop to fix above any_of bug.
Reviewed By: MaskRay, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D79872
show more ...
|
#
dcdb1b94 |
| 29-Apr-2020 |
Davide Italiano <ditaliano@apple.com> |
[MachineVerifier] Remove an unused function. NFCI.
|
#
59acdf0a |
| 27-Apr-2020 |
Nick Desaulniers <ndesaulniers@google.com> |
fix D78849 for g++ < 7.1
Summary: Looks like g++ < 7.1 has a bug resolving calls to member functions without `this->` in lamdas with `auto` types. It looks like multiple build bots are using g++-5.
fix D78849 for g++ < 7.1
Summary: Looks like g++ < 7.1 has a bug resolving calls to member functions without `this->` in lamdas with `auto` types. It looks like multiple build bots are using g++-5.
https://stackoverflow.com/questions/32097759/calling-this-member-function-from-generic-lambda-clang-vs-gcc https://godbolt.org/z/MiaRt-
Reviewers: MaskRay, efriedma, jyknight, craig.topper, rsmith
Reviewed By: rsmith
Subscribers: hiraditya, llvm-commits, srhines
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78962
show more ...
|
#
c695ea2a |
| 27-Apr-2020 |
Nick Desaulniers <ndesaulniers@google.com> |
[MachineVerifier] retrofit iterators with range for. NFC
Summary: Reviewing failures identified in D78586, I was finding the identifiers for these iterators hard to read.
Reviewers: efriedma, MaskR
[MachineVerifier] retrofit iterators with range for. NFC
Summary: Reviewing failures identified in D78586, I was finding the identifiers for these iterators hard to read.
Reviewers: efriedma, MaskRay, jyknight
Reviewed By: MaskRay
Subscribers: hiraditya, llvm-commits, srhines
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78849
show more ...
|
#
edbb27cc |
| 14-Apr-2020 |
Denis Antrushin <dantrushin@gmail.com> |
[Statepoint] Add getters to StatepointOpers.
To simplify future work on statepoint representation, hide direct access to statepoint field indices and provide getters for them. Add getters for couple
[Statepoint] Add getters to StatepointOpers.
To simplify future work on statepoint representation, hide direct access to statepoint field indices and provide getters for them. Add getters for couple more statepoint fields.
This also fixes two bugs in MachineVerifier for statepoint: First, the `break` statement was falling out of `if` statement scope, thus disabling following checks. Second, it was incorrectly accessing some fields like CallingConv - StatepointOpers gives index to their value directly, not to preceeding field type encoding.
Reviewed By: skatkov Differential Revision: https://reviews.llvm.org/D78119
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6 |
|
#
ea11f472 |
| 23-Mar-2020 |
Marcello Maggioni <hayarms@gmail.com> |
Split LiveRangeCalc in LiveRangeCalc/LiveIntervalCalc. NFC
Summary: Refactor LiveRangeCalc such that it is now split into two classes
The objective is to split all the "register specific" logic awa
Split LiveRangeCalc in LiveRangeCalc/LiveIntervalCalc. NFC
Summary: Refactor LiveRangeCalc such that it is now split into two classes
The objective is to split all the "register specific" logic away from LiveRangeCalc. The two new classes created are:
- LiveRangeCalc - is meant as a generic class to compute and modify live ranges in a generic way. This class should deal only with SlotIndices and VNInfo objects.
- LiveIntervalCals - is meant to be equivalent to the old LiveRangeCalc. It computes the liveness virtual registers tracked by a LiveInterval object.
With this refactoring LiveRangeCalc can be used to implement tracking of liveness of LiveRanges that represent other things than just registers.
Subscribers: MatzeB, qcolombet, mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D76584
show more ...
|
Revision tags: llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
f002ee55 |
| 03-Mar-2020 |
Vedant Kumar <vsk@apple.com> |
[MachineVerifier] Remove placement rule exception for debug entry values
There should not be an exception allowing debug entry values to be placed after a terminator.
Differential Revision: https:/
[MachineVerifier] Remove placement rule exception for debug entry values
There should not be an exception allowing debug entry values to be placed after a terminator.
Differential Revision: https://reviews.llvm.org/D75559
show more ...
|
#
b3bce6a3 |
| 24-Feb-2020 |
Roman Tereshin <rtereshin@apple.com> |
[MachineVerifier] Doing ::calcRegsPassed over faster sets: ~15-20% faster MV, NFC
MachineVerifier still takes 45-50% of total compile time with -verify-machineinstrs, with calcRegsPassed dataflow ta
[MachineVerifier] Doing ::calcRegsPassed over faster sets: ~15-20% faster MV, NFC
MachineVerifier still takes 45-50% of total compile time with -verify-machineinstrs, with calcRegsPassed dataflow taking ~50-60% of MachineVerifier.
The majority of that time is spent in BBInfo::addPassed, mostly within DenseSet implementing the sets the dataflow is operating over.
In particular, 1/4 of that DenseSet time is spent just iterating over it (operator++), 40-50% on insertions, and most of the rest in ::count.
Given that, we're implementing custom sets just for this analysis here, focusing on cheap insertions and O(n) iteration time (as opposed to O(U), where U is the universe).
As it's based _mostly_ on BitVector for sparse and SmallVector for dense, it may remotely resemble SparseSet. The difference is, our solution is a lot less clever, doesn't have constant time `clear` that we won't use anyway as reusing these sets across analyses is cumbersome, and thus more space efficient and safer (got a resizable Universe and a fallback to DenseSet for sparse if it gets too big).
With this patch MachineVerifier gets ~15-20% faster, its contribution to total compile time drops from 45-50% to ~35%, while contribution of calcRegsPassed to MachineVerifier drops from 50-60% to ~35% as well.
calcRegsPassed itself gets another 2x faster here.
All measured on a large suite of shaders targeting a number of GPUs.
Reviewers: bogner, stoklund, rudkx, qcolombet
Reviewed By: rudkx
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75033
show more ...
|
#
23c2a5ce |
| 25-Feb-2020 |
Bill Wendling <morbo@google.com> |
Allow "callbr" to return non-void values
Summary: Terminators in LLVM aren't prohibited from returning values. This means that the "callbr" instruction, which is used for "asm goto", can support "as
Allow "callbr" to return non-void values
Summary: Terminators in LLVM aren't prohibited from returning values. This means that the "callbr" instruction, which is used for "asm goto", can support "asm goto with outputs."
This patch removes all restrictions against "callbr" returning values. The heavy lifting is done by the code generator. The "INLINEASM_BR" instruction's a terminator, and the code generator doesn't allow non-terminator instructions after a terminator. In order to correctly model the feature, we need to copy outputs from "INLINEASM_BR" into virtual registers. Of course, those copies aren't terminators.
To get around this issue, we split the block containing the "INLINEASM_BR" right before the "COPY" instructions. This results in two cheats:
- Any physical registers defined by "INLINEASM_BR" need to be marked as live-in into the block with the "COPY" instructions. This violates an assumption that physical registers aren't marked as "live-in" until after register allocation. But it seems as if the live-in information only needs to be correct after register allocation. So we're able to get away with this.
- The indirect branches from the "INLINEASM_BR" are moved to the "COPY" block. This is to satisfy PHI nodes.
I've been told that MLIR can support this handily, but until we're able to use it, we'll have to stick with the above.
Reviewers: jyknight, nickdesaulniers, hfinkel, MaskRay, lattner
Reviewed By: nickdesaulniers, MaskRay, lattner
Subscribers: rriddle, qcolombet, jdoerfert, MatzeB, echristo, MaskRay, xbolva00, aaron.ballman, cfe-commits, JonChesterfield, hiraditya, llvm-commits, rnk, craig.topper
Tags: #llvm, #clang
Differential Revision: https://reviews.llvm.org/D69868
show more ...
|
#
6f87b162 |
| 24-Feb-2020 |
Roman Tereshin <rtereshin@apple.com> |
[MachineVerifier] Doing ::calcRegsPassed in RPO: ~35% faster MV, NFC
Depending on the target, test suite, pipeline config and perhaps other factors machine verifier when forced on with -verify-machi
[MachineVerifier] Doing ::calcRegsPassed in RPO: ~35% faster MV, NFC
Depending on the target, test suite, pipeline config and perhaps other factors machine verifier when forced on with -verify-machineinstrs can increase compile time 2-2.5 times over (Release, Asserts On), taking up ~60% of the time. An invaluable tool, it significantly slows down machine verifier-enabled testing.
Nearly 75% of its time MachineVerifier spends in the calcRegsPassed method. It's a classic forward dataflow analysis executed over sets, but visiting MBBs in arbitrary order. We switch that to RPO here.
This speeds up MachineVerifier by about 35%, decreasing the overall compile time with -verify-machineinstrs by 20-25% or so.
calcRegsPassed itself gets 2x faster here.
All measured on a large suite of shaders targeting a number of GPUs.
Reviewers: bogner, stoklund, rudkx, qcolombet
Reviewed By: bogner
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75032
show more ...
|
Revision tags: llvmorg-10.0.0-rc2 |
|
#
9d37f5af |
| 06-Feb-2020 |
Thomas Lively <tlively@google.com> |
[WebAssembly] Implement multivalue call_indirects
Summary: Unlike normal calls, call_indirects have immediate arguments that caused a MachineVerifier failure without a small tweak to loosen the veri
[WebAssembly] Implement multivalue call_indirects
Summary: Unlike normal calls, call_indirects have immediate arguments that caused a MachineVerifier failure without a small tweak to loosen the verifier's requirements for variadicOpsAreDefs instructions.
One nice thing about the new call_indirects is that they do not need to participate in the PCALL_INDIRECT mechanism because their post-isel hook handles moving the function pointer argument and adding the flags and typeindex arguments itself.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74191
show more ...
|
Revision tags: llvmorg-10.0.0-rc1 |
|
#
941f20c3 |
| 26-Jan-2020 |
Fangrui Song <i@maskray.me> |
[MachineVerifier] Simplify and delete LLVM_VERIFY_MACHINEINSTRS from a comment. NFC
The environment variable has been unused since r228079.
|
#
020041d9 |
| 21-Jan-2020 |
Krzysztof Parzyszek <kparzysz@quicinc.com> |
Update spelling of {analyze,insert,remove}Branch in strings and comments
These names have been changed from CamelCase to camelCase, but there were many places (comments mostly) that still used the o
Update spelling of {analyze,insert,remove}Branch in strings and comments
These names have been changed from CamelCase to camelCase, but there were many places (comments mostly) that still used the old names.
This change is NFC.
show more ...
|
#
c969335a |
| 16-Jan-2020 |
Jeremy Morse <jeremy.morse@sony.com> |
Revert "[PHIEliminate] Move dbg values after phi and label"
Testing compiler-rt, a new assertion failure occurs when building the GwpAsanTestObjects object. I'm uploading a reproducer to D70597.
Th
Revert "[PHIEliminate] Move dbg values after phi and label"
Testing compiler-rt, a new assertion failure occurs when building the GwpAsanTestObjects object. I'm uploading a reproducer to D70597.
This reverts commit 75188b01e9af3a89639d84be912f84610d6885ba.
show more ...
|
#
75188b01 |
| 16-Jan-2020 |
Chris Ye <yechunliang@gmail.com> |
[PHIEliminate] Move dbg values after phi and label
If there are DBG_VALUEs between phi and label (after phi and before label), DBG_VALUE will block PHI lowering after the LABEL. Moving all DBG_VALUE
[PHIEliminate] Move dbg values after phi and label
If there are DBG_VALUEs between phi and label (after phi and before label), DBG_VALUE will block PHI lowering after the LABEL. Moving all DBG_VALUEs after Labels in the function ScheduleDAGSDNodes::EmitSchedule to avoid impacting PHI lowering.
before: PHI DBG_VALUE LABEL after: (move DBG_VALUE after label) PHI LABEL DBG_VALUE then: (phi lowering after label) LABEL COPY DBG_VALUE
Fixes the issue: https://bugs.llvm.org/show_bug.cgi?id=43859
Differential Revision: https://reviews.llvm.org/D70597
show more ...
|
Revision tags: llvmorg-11-init |
|
#
e68e4cbc |
| 13-Jan-2020 |
Eli Friedman <efriedma@quicinc.com> |
[GlobalISel] Change representation of shuffle masks in MachineOperand.
We're planning to remove the shufflemask operand from ShuffleVectorInst (D72467); fix GlobalISel so it doesn't depend on that C
[GlobalISel] Change representation of shuffle masks in MachineOperand.
We're planning to remove the shufflemask operand from ShuffleVectorInst (D72467); fix GlobalISel so it doesn't depend on that Constant.
The change to prelegalizercombiner-shuffle-vector.mir happens because the input contains a literal "-1" in the mask (so the parser/verifier weren't really handling it properly). We now treat it as equivalent to "undef" in all contexts.
Differential Revision: https://reviews.llvm.org/D72663
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
659efa21 |
| 19-Nov-2019 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
Recommit "[MachineVerifier] Improve verification of live-in lists."
MachineVerifier::visitMachineFunctionAfter() is extended to check the live-through case for live-in lists. This is only done for r
Recommit "[MachineVerifier] Improve verification of live-in lists."
MachineVerifier::visitMachineFunctionAfter() is extended to check the live-through case for live-in lists. This is only done for registers without aliases and that are neither allocatable or reserved, such as the SystemZ::CC register.
The MachineVerifier earlier only catched the case of a live-in use without an entry in the live-in list (as "using an undefined physical register").
A comment in LivePhysRegs.h has been added stating a guarantee that addLiveOuts() can be trusted for a full register both before and after register allocation.
Review: Quentin Colombet
Differential Revision: https://reviews.llvm.org/D68267
show more ...
|
#
e886e762 |
| 07-Jan-2020 |
Bill Wendling <isanbard@gmail.com> |
Revert "Allow output constraints on "asm goto""
This reverts commit 52366088a8e42c2f1e96e8430b84b8b65ec3f7bc.
I accidentally pushed this before supporting changes.
|
#
52366088 |
| 07-Jan-2020 |
Bill Wendling <morbo@google.com> |
Allow output constraints on "asm goto"
Summary: Remove the restrictions that preventing "asm goto" from returning non-void values. The values returned by "asm goto" are only valid on the "fallthroug
Allow output constraints on "asm goto"
Summary: Remove the restrictions that preventing "asm goto" from returning non-void values. The values returned by "asm goto" are only valid on the "fallthrough" path.
Reviewers: jyknight, nickdesaulniers, hfinkel
Reviewed By: jyknight, nickdesaulniers
Subscribers: rsmith, hiraditya, llvm-commits, cfe-commits, craig.topper, rnk
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D69876
show more ...
|
#
76a5c842 |
| 05-Dec-2019 |
Florian Hahn <flo@fhahn.com> |
[MCRegInfo] Add forward sub and super register iterators. (NFC)
This patch adds forward iterators mc_difflist_iterator, mc_subreg_iterator and mc_superreg_iterator, based on the existing DiffListIte
[MCRegInfo] Add forward sub and super register iterators. (NFC)
This patch adds forward iterators mc_difflist_iterator, mc_subreg_iterator and mc_superreg_iterator, based on the existing DiffListIterator. Those are used to provide iterator ranges over sub- and super-register from TRI, which are slightly more convenient than the existing MCSubRegIterator/MCSuperRegIterator. Unfortunately, it duplicates a bit of functionality, but the new iterators are a bit more convenient (and can be used with various existing iterator utilities) and should probably replace the old iterators in the future.
This patch updates some existing users.
Reviewers: evandro, qcolombet, paquette, MatzeB, arsenm
Reviewed By: qcolombet
Differential Revision: https://reviews.llvm.org/D70565
show more ...
|
#
4fd8f119 |
| 01-Nov-2019 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
[MachineVerifier] Improve checks of target instructions operands.
While working with a patch for instruction selection, the splitting of a large immediate ended up begin treated incorrectly by the
[MachineVerifier] Improve checks of target instructions operands.
While working with a patch for instruction selection, the splitting of a large immediate ended up begin treated incorrectly by the backend. Where a register operand should have been created, it instead became an immediate. To my surprise the machine verifier failed to report this, which at the time would have been helpful.
This patch improves the verifier so that it will report this type of error.
This patch XFAILs CodeGen/SPARC/fp128.ll, which has been reported at https://bugs.llvm.org/show_bug.cgi?id=44091
Review: thegameg, arsenm, fhahn https://reviews.llvm.org/D63973
show more ...
|
#
05da2fe5 |
| 13-Nov-2019 |
Reid Kleckner <rnk@google.com> |
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of reco
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation.
I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h
Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild.
Reviewers: bkramer, asbirlea, bollu, jdoerfert
Differential Revision: https://reviews.llvm.org/D70211
show more ...
|
#
ad3c9d46 |
| 07-Nov-2019 |
Galina Kistanova <gkistanova@gmail.com> |
Revert "[MachineVerifier] Improve verification of live-in lists.
This reverts commit b7b170c to give the author more time to address failing tests on the expensive checks buildbots.
|