#
e67fc4a3 |
| 11-Oct-2016 |
Matthias Braun <matze@braunis.de> |
Fix warning; NFC
llvm-svn: 283851
|
#
3d85ebe5 |
| 11-Oct-2016 |
Matthias Braun <matze@braunis.de> |
MIRParser: generic register operands with types
This should fix the fallout of r283848.
llvm-svn: 283850
|
#
74ad41c7 |
| 11-Oct-2016 |
Matthias Braun <matze@braunis.de> |
MIRParser: Rewrite register info initialization; mostly NFC
This changes MachineRegisterInfo to be initializes after parsing all instructions. This is in preparation for upcoming commits that allow
MIRParser: Rewrite register info initialization; mostly NFC
This changes MachineRegisterInfo to be initializes after parsing all instructions. This is in preparation for upcoming commits that allow the register class specification on the operand or deduce them from the MCInstrDesc.
This commit removes the unused feature of having nonsequential register numbers. This was confusing anyway as the vreg numbers would be different after parsing when you had "holes" in your numbering.
This patch also introduces the concept of an incomplete virtual register. An incomplete virtual register may be used during .mir parsing to construct MachineOperands without knowing the exact register class (or register bank) yet.
NFC except for some error messages.
Differential Revision: https://reviews.llvm.org/D22397
llvm-svn: 283848
show more ...
|
#
b124331d |
| 27-Sep-2016 |
Geoff Berry <gberry@codeaurora.org> |
[TargetRegisterInfo, AArch64] Add target hook for isConstantPhysReg().
Summary: The current implementation of isConstantPhysReg() checks for defs of physical registers to determine if they are const
[TargetRegisterInfo, AArch64] Add target hook for isConstantPhysReg().
Summary: The current implementation of isConstantPhysReg() checks for defs of physical registers to determine if they are constant. Some architectures (e.g. AArch64 XZR/WZR) have registers that are constant and may be used as destinations to indicate the generated value is discarded, preventing isConstantPhysReg() from returning true. This change adds a TargetRegisterInfo hook that overrides the no defs check for cases such as this.
Reviewers: MatzeB, qcolombet, t.p.northover, jmolloy
Subscribers: junbuml, aemerson, mcrosier, rengolin
Differential Revision: https://reviews.llvm.org/D24570
llvm-svn: 282543
show more ...
|
#
32a078ad |
| 15-Sep-2016 |
Tim Northover <tnorthover@apple.com> |
GlobalISel: remove "unsized" LLT
It was only really there as a sentinel when instructions had to have precisely one type. Now that registers are typed, each register really has to have a type that i
GlobalISel: remove "unsized" LLT
It was only really there as a sentinel when instructions had to have precisely one type. Now that registers are typed, each register really has to have a type that is sized.
llvm-svn: 281599
show more ...
|
#
d28d3cc0 |
| 12-Sep-2016 |
Tim Northover <tnorthover@apple.com> |
GlobalISel: disambiguate types when printing MIR
Some generic instructions have multiple types. While in theory these always be discovered by inspecting the single definition of each generic vreg, i
GlobalISel: disambiguate types when printing MIR
Some generic instructions have multiple types. While in theory these always be discovered by inspecting the single definition of each generic vreg, in practice those definitions won't always be local and traipsing through a big function to find them will not be fun.
So this changes MIRPrinter to print out the type of uses as well as defs, if they're known to be different or not known to be the same.
On the parsing side, we're a little more flexible: provided each register is given a type in at least one place it's mentioned (and all types are consistent) we accept the MIR. This doesn't introduce ambiguity but makes writing tests manually a bit less painful.
llvm-svn: 281204
show more ...
|
#
0f140c76 |
| 09-Sep-2016 |
Tim Northover <tnorthover@apple.com> |
GlobalISel: move type information to MachineRegisterInfo.
We want each register to have a canonical type, which means the best place to store this is in MachineRegisterInfo rather than on every Mach
GlobalISel: move type information to MachineRegisterInfo.
We want each register to have a canonical type, which means the best place to store this is in MachineRegisterInfo rather than on every MachineInstr that happens to use or define that register.
Most changes following from this are pretty simple (you need an MRI anyway if you're going to be doing any transformations, so just check the type there). But legalization doesn't really want to check redundant operands (when, for example, a G_ADD only ever has one type) so I've made use of MCInstrDesc's operand type field to encode these constraints and limit legalization's work.
As an added bonus, more validation is possible, both in MachineVerifier and MachineIRBuilder (coming soon).
llvm-svn: 281035
show more ...
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3 |
|
#
f1b20c52 |
| 24-Aug-2016 |
Matthias Braun <matze@braunis.de> |
MachineRegisterInfo/MIR: Initialize tracksSubRegLiveness early, do not print/parser it
tracksSubRegLiveness only depends on the Subtarget and a cl::opt, there is not need to change it or save/parse
MachineRegisterInfo/MIR: Initialize tracksSubRegLiveness early, do not print/parser it
tracksSubRegLiveness only depends on the Subtarget and a cl::opt, there is not need to change it or save/parse it in a .mir file. Make the field const and move the initialization LiveIntervalAnalysis to the MachineRegisterInfo constructor. Also cleanup some code and fix some instances which better use MachineRegisterInfo::subRegLivenessEnabled() instead of TargetSubtargetInfo::enableSubRegLiveness().
llvm-svn: 279676
show more ...
|
Revision tags: llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1 |
|
#
6756a2c9 |
| 27-Jul-2016 |
Ahmed Bougacha <ahmed.bougacha@gmail.com> |
[GlobalISel] Introduce an instruction selector.
And implement it for AArch64, supporting x/w ADD/OR.
Differential Revision: https://reviews.llvm.org/D22373
llvm-svn: 276875
|
#
5a59b24b |
| 19-Jul-2016 |
Ahmed Bougacha <ahmed.bougacha@gmail.com> |
[GlobalISel] Mark newly-created gvregs as having a bank.
Also verify that we never try to set the size of a vreg associated to a register class.
Report an error when we encounter that in MIR. Fix a
[GlobalISel] Mark newly-created gvregs as having a bank.
Also verify that we never try to set the size of a vreg associated to a register class.
Report an error when we encounter that in MIR. Fix a testcase that hit that error and had a size for no reason.
llvm-svn: 276012
show more ...
|
#
4f0dad16 |
| 11-Jul-2016 |
Chad Rosier <mcrosier@codeaurora.org> |
[IPRA] Properly compute register usage at call sites.
Differential Revision: http://reviews.llvm.org/D21395 Patch by Vivek Pandya. PR28144
llvm-svn: 275087
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
f7b2bce1 |
| 11-Apr-2016 |
Derek Schuff <dschuff@google.com> |
Replace MachineRegisterInfo::TracksLiveness with a MachineFunctionProperty
Use the MachineFunctionProperty mechanism to indicate whether the liveness info is accurate instead of a bool flag on MRI.
Replace MachineRegisterInfo::TracksLiveness with a MachineFunctionProperty
Use the MachineFunctionProperty mechanism to indicate whether the liveness info is accurate instead of a bool flag on MRI. Keeps the MRI accessor function for convenience. NFC
Differential Revision: http://reviews.llvm.org/D18767
llvm-svn: 266020
show more ...
|
#
c33085f2 |
| 07-Apr-2016 |
Quentin Colombet <qcolombet@apple.com> |
[MachineRegisterInfo] Track register bank for virtual registers. A virtual register may have either a register bank or a register class. This is represented by a PointerUnion between the related clas
[MachineRegisterInfo] Track register bank for virtual registers. A virtual register may have either a register bank or a register class. This is represented by a PointerUnion between the related classes.
Typically, a virtual register went through the following states regarding register class and register bank:
1. Creation: None is set. Virtual registers are fully generic. 2. Register bank assignment: Register bank is set. Virtual registers live into a register bank, but we do not know the constraints they need to fulfil. 3. Instruction selection: Register class is set. Virtual registers are bound by encoding constraints.
To map these states to GlobalISel, the IRTranslator implements #1, RegBankSelect #2, and Select #3.
llvm-svn: 265696
show more ...
|
#
73900c68 |
| 04-Apr-2016 |
Derek Schuff <dschuff@google.com> |
Replace MachineRegisterInfo::isSSA() with a MachineFunctionProperty
Use the MachineFunctionProperty mechanism to indicate whether a MachineFunction is in SSA form instead of a custom method on Machi
Replace MachineRegisterInfo::isSSA() with a MachineFunctionProperty
Use the MachineFunctionProperty mechanism to indicate whether a MachineFunction is in SSA form instead of a custom method on MachineRegisterInfo. NFC
Differential Revision: http://reviews.llvm.org/D18574
llvm-svn: 265318
show more ...
|
#
1bd7504e |
| 07-Mar-2016 |
Quentin Colombet <qcolombet@apple.com> |
[MachineRegisterInfo] Add a method to set the size of a virtual register a posteriori. This is required for mir testing.
llvm-svn: 262861
|
#
70a9670d |
| 07-Mar-2016 |
Quentin Colombet <qcolombet@apple.com> |
[MachineRegisterInfo] Get rid of the global-isel ifdefs. One additional pointer is not a big deal size-wise and it makes the code much nicer!
llvm-svn: 262856
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3 |
|
#
e1494c35 |
| 11-Feb-2016 |
Quentin Colombet <qcolombet@apple.com> |
[GlobalISel][MachineRegisterInfo] Add a method to create generic vregs. For now, generic virtual registers will not have a register class. We may want to change that. For instance, if we want to use
[GlobalISel][MachineRegisterInfo] Add a method to create generic vregs. For now, generic virtual registers will not have a register class. We may want to change that. For instance, if we want to use all the methods from TargetRegisterInfo with generic virtual registers, we need to either have some sort of generic register classes that do what we want, or teach those methods how to deal with nullptr register class.
Although the latter seems easy enough to do, we may still want to differenciate generic register classes from nullptr to catch cases where nullptr gets introduced by a bug of some sort.
Anyway, I will file a PR to keep track of that.
llvm-svn: 260474
show more ...
|
#
36ce1b01 |
| 10-Feb-2016 |
Quentin Colombet <qcolombet@apple.com> |
[GlobalISel] Remember the size of generic virtual registers
llvm-svn: 260468
|
Revision tags: llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1 |
|
#
e25b06fa |
| 02-Dec-2015 |
Fiona Glaser <escha@apple.com> |
Scheduler / Regalloc: use unique_ptr[] instead of std::vector
vector.resize() is significantly slower than memset in many STLs and the cost of initializing these vectors is significant on targets wi
Scheduler / Regalloc: use unique_ptr[] instead of std::vector
vector.resize() is significantly slower than memset in many STLs and the cost of initializing these vectors is significant on targets with many registers. Since we don't need the overhead of a vector, use a simple unique_ptr instead.
llvm-svn: 254526
show more ...
|
Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1 |
|
#
84921b98 |
| 24-Oct-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Refactor: Simplify boolean conditional return statements in lib/CodeGen.
Patch by Richard.
llvm-svn: 251213
|
#
e6a2485e |
| 25-Sep-2015 |
Matthias Braun <matze@braunis.de> |
TargetRegisterInfo: Add typedef unsigned LaneBitmask and use it where apropriate; NFC
llvm-svn: 248623
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3 |
|
#
d55bcf26 |
| 18-Aug-2015 |
Matthias Braun <matze@braunis.de> |
MachineRegisterInfo: Introduce isPhysRegUsed()
This method checks whether a physical regiser or any of its aliases are used in the function.
Using this function in SIRegisterInfo::findUnusedReg() s
MachineRegisterInfo: Introduce isPhysRegUsed()
This method checks whether a physical regiser or any of its aliases are used in the function.
Using this function in SIRegisterInfo::findUnusedReg() should also fix this reported failure:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150803/292143.html http://reviews.llvm.org/rL242173#inline-533
The report doesn't come with a testcase and I don't know enough about AMDGPU to create one myself.
llvm-svn: 245329
show more ...
|
Revision tags: studio-1.4, llvmorg-3.7.0-rc2 |
|
#
10b23525 |
| 27-Jul-2015 |
Alex Lorenz <arphaman@gmail.com> |
Reset the virtual registers in liveins when clearing the virtual registers.
This commit zeroes out the virtual register references in the machine function's liveins in the class 'MachineRegisterInfo
Reset the virtual registers in liveins when clearing the virtual registers.
This commit zeroes out the virtual register references in the machine function's liveins in the class 'MachineRegisterInfo' when the virtual register definitions are cleared.
Reviewers: Matthias Braun llvm-svn: 243290
show more ...
|
Revision tags: llvmorg-3.7.0-rc1 |
|
#
9912bb81 |
| 14-Jul-2015 |
Matthias Braun <matze@braunis.de> |
MachineRegisterInfo: Remove UsedPhysReg infrastructure
We have a detailed def/use lists for every physical register in MachineRegisterInfo anyway, so there is little use in maintaining an additional
MachineRegisterInfo: Remove UsedPhysReg infrastructure
We have a detailed def/use lists for every physical register in MachineRegisterInfo anyway, so there is little use in maintaining an additional bitset of which ones are used.
Removing it frees us from extra book keeping. This simplifies VirtRegMap.
Differential Revision: http://reviews.llvm.org/D10911
llvm-svn: 242173
show more ...
|
#
02564865 |
| 14-Jul-2015 |
Matthias Braun <matze@braunis.de> |
PrologEpilogInserter: Rewrite API to determine callee save regsiters.
This changes TargetFrameLowering::processFunctionBeforeCalleeSavedScan():
- Rename the function to determineCalleeSaves() - Pas
PrologEpilogInserter: Rewrite API to determine callee save regsiters.
This changes TargetFrameLowering::processFunctionBeforeCalleeSavedScan():
- Rename the function to determineCalleeSaves() - Pass a bitset of callee saved registers by reference, thus avoiding the function-global PhysRegUsed bitset in MachineRegisterInfo. - Without PhysRegUsed the implementation is fine tuned to not save physcial registers which are only read but never modified.
Related to rdar://21539507
Differential Revision: http://reviews.llvm.org/D10909
llvm-svn: 242165
show more ...
|