#
32a40564 |
| 11-Sep-2017 |
Eugene Zelenko <eugene.zelenko@gmail.com> |
[CodeGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 312971
|
#
cebdb175 |
| 01-Sep-2017 |
Matthias Braun <matze@braunis.de> |
LiveIntervalAnalysis: Fix alias regunit reserved definition
A register in CodeGen can be marked as reserved: In that case we consider the register always live and do not use (or rather ignore) kill/
LiveIntervalAnalysis: Fix alias regunit reserved definition
A register in CodeGen can be marked as reserved: In that case we consider the register always live and do not use (or rather ignore) kill/dead/undef operand flags.
LiveIntervalAnalysis however tracks liveness per register unit (not per register). We already needed adjustments for this in r292871 to deal with super/sub registers. However I did not look at aliased register there. Looking at ARM:
FPSCR (regunits FPSCR, FPSCR~FPSCR_NZCV) aliases with FPSCR_NZCV (regunits FPSCR_NZCV, FPSCR~FPSCR_NZCV) hence they share a register unit (FPSCR~FPSCR_NZCV) that represents the aliased parts of the registers. This shared register unit was previously considered non-reserved, however given that we uses of the reserved FPSCR potentially violate some rules (like uses without defs) we should make FPSCR~FPSCR_NZCV reserved too and stop tracking liveness for it.
This patch: - Defines a register unit as reserved when: At least for one root register, the root register and all its super registers are reserved. - Adjust LiveIntervals::computeRegUnitRange() for new reserved definition. - Add MachineRegisterInfo::isReservedRegUnit() to have a canonical way of testing. - Stop computing LiveRanges for reserved register units in HMEditor even with UpdateFlags enabled. - Skip verification of uses of reserved reg units in the machine verifier (this usually didn't happen because there would be no cached liverange but there is no guarantee for that and I would run into this case before the HMEditor tweak, so may as well fix the verifier too).
Note that this should only affect ARMs FPSCR/FPSCR_NZCV registers today; aliased registers are rarely used, the only other cases are hexagons P0-P3/P3_0 and C8/USR pairs which are not mixing reserved/non-reserved registers in an alias.
Differential Revision: https://reviews.llvm.org/D37356
llvm-svn: 312348
show more ...
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3 |
|
#
efd8a84c |
| 23-Aug-2017 |
Aditya Nandakumar <aditya_nandakumar@apple.com> |
[GISEl]: Translate phi into G_PHI
G_PHI has the same semantics as PHI but also has types. This lets us verify that the types in the G_PHI are consistent. This also allows specifying legalization act
[GISEl]: Translate phi into G_PHI
G_PHI has the same semantics as PHI but also has types. This lets us verify that the types in the G_PHI are consistent. This also allows specifying legalization actions for G_PHIs.
https://reviews.llvm.org/D36990
llvm-svn: 311596
show more ...
|
Revision tags: llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
9c3e2eac |
| 06-Jul-2017 |
Mikael Holmen <mikael.holmen@ericsson.com> |
[MachineVerifier] Add check that tied physregs aren't different.
Summary: Added MachineVerifier code to check register ties more thoroughly, especially so that physical registers that are tied are t
[MachineVerifier] Add check that tied physregs aren't different.
Summary: Added MachineVerifier code to check register ties more thoroughly, especially so that physical registers that are tied are the same. This may help e.g. when creating MIR files.
Original patch by Jesper Antonsson
Reviewers: stoklund, sanjoy, qcolombet
Reviewed By: qcolombet
Subscribers: qcolombet, llvm-commits
Differential Revision: https://reviews.llvm.org/D34394
llvm-svn: 307259
show more ...
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
1ee25e0c |
| 08-Jun-2017 |
Matthias Braun <matze@braunis.de> |
RegAllocPBQP: Do not assign reserved physical register
(0) RegAllocPBQP: Since getRawAllocationOrder() may return a collection that includes reserved physical registers, iterate to find an un-reserv
RegAllocPBQP: Do not assign reserved physical register
(0) RegAllocPBQP: Since getRawAllocationOrder() may return a collection that includes reserved physical registers, iterate to find an un-reserved physical register.
(1) VirtRegMap: Enforce the invariant: "no reserved physical registers" in assignVirt2Phys(). Previously, this was checked only after the fact in VirtRegRewriter::rewrite.
(2) MachineVerifier: updated the test per MatzeB's review.
(3) +testcase
Patch by Nick Johnson<Nicholas.Paul.Johnson@deshawresearch.com>!
Differential Revision: https://reviews.llvm.org/D33947
llvm-svn: 305016
show more ...
|
#
6bda14b3 |
| 06-Jun-2017 |
Chandler Carruth <chandlerc@gmail.com> |
Sort the remaining #include lines in include/... and lib/....
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line
Sort the remaining #include lines in include/... and lib/....
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days.
I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch.
This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files.
Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again).
llvm-svn: 304787
show more ...
|
#
0f02bbc6 |
| 02-Jun-2017 |
Philip Reames <listmail@philipreames.com> |
Verify a couple more fields in STATEPOINT instructions
While doing so, clarify the comments and update them to reflect current reality.
Note: I'm going to let this sit for a week or so before addin
Verify a couple more fields in STATEPOINT instructions
While doing so, clarify the comments and update them to reflect current reality.
Note: I'm going to let this sit for a week or so before adding further verification. I want to give this time to cycle through bots and merge it into our downstream tree before pushing this further. llvm-svn: 304565
show more ...
|
#
94cc4a29 |
| 02-Jun-2017 |
Philip Reames <listmail@philipreames.com> |
Add placeholder for more extensive verification of psuedo ops
This initial patch doesn't actually do much useful. It's just to show where the new code goes. Once this is in, I'll extend the verifica
Add placeholder for more extensive verification of psuedo ops
This initial patch doesn't actually do much useful. It's just to show where the new code goes. Once this is in, I'll extend the verification logic to check more useful properties.
For those curious, the more complicated version of this patch already found one very suspicious thing.
Differential Revision: https://reviews.llvm.org/D33819
llvm-svn: 304564
show more ...
|
Revision tags: llvmorg-4.0.1-rc2 |
|
#
d8f4e999 |
| 26-May-2017 |
Matthias Braun <matze@braunis.de> |
MachineVerifier: Remove unused set; NFC
llvm-svn: 304035
|
#
b52e0366 |
| 17-May-2017 |
Francis Visoiu Mistrih <fvisoiumistrih@apple.com> |
BitVector: add iterators for set bits
Differential revision: https://reviews.llvm.org/D32060
llvm-svn: 303227
|
#
d526b13e |
| 09-May-2017 |
Serge Pavlov <sepavloff@gmail.com> |
Add extra operand to CALLSEQ_START to keep frame part set up previously
Using arguments with attribute inalloca creates problems for verification of machine representation. This attribute instructs
Add extra operand to CALLSEQ_START to keep frame part set up previously
Using arguments with attribute inalloca creates problems for verification of machine representation. This attribute instructs the backend that the argument is prepared in stack prior to CALLSEQ_START..CALLSEQ_END sequence (see http://llvm.org/docs/InAlloca.htm for details). Frame size stored in CALLSEQ_START in this case does not count the size of this argument. However CALLSEQ_END still keeps total frame size, as caller can be responsible for cleanup of entire frame. So CALLSEQ_START and CALLSEQ_END keep different frame size and the difference is treated by MachineVerifier as stack error. Currently there is no way to distinguish this case from actual errors.
This patch adds additional argument to CALLSEQ_START and its target-specific counterparts to keep size of stack that is set up prior to the call frame sequence. This argument allows MachineVerifier to calculate actual frame size associated with frame setup instruction and correctly process the case of inalloca arguments.
The changes made by the patch are: - Frame setup instructions get the second mandatory argument. It affects all targets that use frame pseudo instructions and touched many files although the changes are uniform. - Access to frame properties are implemented using special instructions rather than calls getOperand(N).getImm(). For X86 and ARM such replacement was made previously. - Changes that reflect appearance of additional argument of frame setup instruction. These involve proper instruction initialization and methods that access instruction arguments. - MachineVerifier retrieves frame size using method, which reports sum of frame parts initialized inside frame instruction pair and outside it.
The patch implements approach proposed by Quentin Colombet in https://bugs.llvm.org/show_bug.cgi?id=27481#c1. It fixes 9 tests failed with machine verifier enabled and listed in PR27481.
Differential Revision: https://reviews.llvm.org/D32394
llvm-svn: 302527
show more ...
|
#
4682ac6c |
| 05-May-2017 |
Matthias Braun <matze@braunis.de> |
ARM: Compute MaxCallFrame size early
This exposes a method in MachineFrameInfo that calculates MaxCallFrameSize and calls it after instruction selection in the ARM target.
This avoids ARMBaseRegist
ARM: Compute MaxCallFrame size early
This exposes a method in MachineFrameInfo that calculates MaxCallFrameSize and calls it after instruction selection in the ARM target.
This avoids ARMBaseRegisterInfo::canRealignStack()/ARMFrameLowering::hasReservedCallFrame() giving different answers in early/late phases of codegen.
The testcase shows a particular nasty example result of that where we would fail to properly align an alloca.
Differential Revision: https://reviews.llvm.org/D32622
llvm-svn: 302303
show more ...
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
802aa667 |
| 20-Apr-2017 |
Serge Pavlov <sepavloff@gmail.com> |
Do not run frame verification if target does not use frame instructions
llvm-svn: 300807
|
#
49acf9c8 |
| 13-Apr-2017 |
Serge Pavlov <sepavloff@gmail.com> |
Use methods to access data stored with frame instructions
Instructions CALLSEQ_START..CALLSEQ_END and their target dependent counterparts keep data like frame size, stack adjustment etc. These data
Use methods to access data stored with frame instructions
Instructions CALLSEQ_START..CALLSEQ_END and their target dependent counterparts keep data like frame size, stack adjustment etc. These data are accessed by getOperand using hard coded indices. It is error prone way. This change implements the access by special methods, which improve readability and allow changing data representation without massive changes of index values.
Differential Revision: https://reviews.llvm.org/D31953
llvm-svn: 300196
show more ...
|
#
20dd36a4 |
| 11-Apr-2017 |
Justin Bogner <mail@justinbogner.com> |
MIR: Allow parsing of empty machine functions
If you run llc -stop-after=codegenprepare and feed the resulting MIR to llc -start-after=codegenprepare, you'll have an empty machine function since we
MIR: Allow parsing of empty machine functions
If you run llc -stop-after=codegenprepare and feed the resulting MIR to llc -start-after=codegenprepare, you'll have an empty machine function since we haven't run any isel yet. Of course, this only works if the MIRParser believes you that this is okay.
This is essentially a revert of r241862 with a fix for the problem it was papering over.
llvm-svn: 299975
show more ...
|
#
04bfa87f |
| 29-Mar-2017 |
Sven van Haastregt <sven.vanhaastregt@arm.com> |
[MachineVerifier] Drop a spurious const
As of r298987 the argument is a value that we std::move, so it shouldn't be const anymore.
llvm-svn: 298999
|
#
039a6d9f |
| 29-Mar-2017 |
Sven van Haastregt <sven.vanhaastregt@arm.com> |
[MachineVerifier] Avoid reference to nullptr
Instantiation of the MachineVerifierPass through PassInfo::getNormalCtor would yield a segfault since the default constructor of the MachineVerifierPass
[MachineVerifier] Avoid reference to nullptr
Instantiation of the MachineVerifierPass through PassInfo::getNormalCtor would yield a segfault since the default constructor of the MachineVerifierPass takes a reference to nullptr.
Patch by Simone Pellegrini.
Differential Revision: https://reviews.llvm.org/D31387
llvm-svn: 298987
show more ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
#
88634996 |
| 17-Feb-2017 |
Tim Northover <tnorthover@apple.com> |
GlobalISel: verify that generic loads & stores have a mem operand.
The mem operand is used by GlobalISel to convey atomic constraints so dropping it is invalid.
llvm-svn: 295476
|
#
900b21c3 |
| 15-Feb-2017 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Fix typos
llvm-svn: 295246
|
Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1 |
|
#
11723322 |
| 05-Jan-2017 |
Matthias Braun <matze@braunis.de> |
CodeGen: Assert that liveness is up to date when reading block live-ins.
Add an assert that checks whether liveins are up to date before they are used.
- Do not print liveins into .mir files anymor
CodeGen: Assert that liveness is up to date when reading block live-ins.
Add an assert that checks whether liveins are up to date before they are used.
- Do not print liveins into .mir files anymore in situations where they are out of date anyway. - The assert in the RegisterScavenger is superseded by the new one in livein_begin(). - Skip parts of the liveness updating logic in IfConversion.cpp when liveness isn't tracked anymore (just enough to avoid hitting the new assert()).
Differential Revision: https://reviews.llvm.org/D27562
llvm-svn: 291169
show more ...
|
#
3749f338 |
| 22-Dec-2016 |
Quentin Colombet <qcolombet@apple.com> |
[GlobalISel] More fix for the size vs. type typo. NFC.
I missed those in my previous commit (r290378).
llvm-svn: 290387
|
#
fa5960a2 |
| 22-Dec-2016 |
Quentin Colombet <qcolombet@apple.com> |
[MachineVerifier] Check that even generic vregs comply to regclass constraints.
We used to not check generic vregs, but that is actually a mistake given nothing in the GlobalISel pipeline is going t
[MachineVerifier] Check that even generic vregs comply to regclass constraints.
We used to not check generic vregs, but that is actually a mistake given nothing in the GlobalISel pipeline is going to fix the constraints on target specific instructions. Therefore, the target has to have them right from the start.
llvm-svn: 290380
show more ...
|
#
ea9f8ce0 |
| 16-Dec-2016 |
Krzysztof Parzyszek <kparzysz@codeaurora.org> |
Implement LaneBitmask::any(), use it to replace !none(), NFCI
llvm-svn: 289974
|
#
91b5cf84 |
| 15-Dec-2016 |
Krzysztof Parzyszek <kparzysz@codeaurora.org> |
Extract LaneBitmask into a separate type
Specifically avoid implicit conversions from/to integral types to avoid potential errors when changing the underlying type. For example, a typical initializa
Extract LaneBitmask into a separate type
Specifically avoid implicit conversions from/to integral types to avoid potential errors when changing the underlying type. For example, a typical initialization of a "full" mask was "LaneMask = ~0u", which would result in a value of 0x00000000FFFFFFFF if the type was extended to uint64_t.
Differential Revision: https://reviews.llvm.org/D27454
llvm-svn: 289820
show more ...
|
Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2 |
|
#
c52fe296 |
| 30-Nov-2016 |
Matthias Braun <matze@braunis.de> |
Clarify rules for reserved regs, fix aarch64 ones.
No test case necessary as the problematic condition is checked with the newly introduced assertAllSuperRegsMarked() function.
Differential Revisio
Clarify rules for reserved regs, fix aarch64 ones.
No test case necessary as the problematic condition is checked with the newly introduced assertAllSuperRegsMarked() function.
Differential Revision: https://reviews.llvm.org/D26648
llvm-svn: 288277
show more ...
|