diff options
| author | Matthias Braun <matze@braunis.de> | 2017-03-17 00:41:39 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2017-03-17 00:41:39 +0000 |
| commit | f0b68d3fbc1b0aa04f05fe8718749de4b1d8978f (patch) | |
| tree | b94ca5046379fe7883074662e852e565e37df39a /llvm/lib/CodeGen/SplitKit.h | |
| parent | fa289ec7f0bf5ee205ad9d607f16166a3762c06a (diff) | |
| download | bcm5719-llvm-f0b68d3fbc1b0aa04f05fe8718749de4b1d8978f.tar.gz bcm5719-llvm-f0b68d3fbc1b0aa04f05fe8718749de4b1d8978f.zip | |
SplitKit: Correctly implement partial subregister copies
- This fixes a bug where subregister incompatible with the vregs register
class where used.
- Implement the case where multiple copies are necessary to cover a
given lanemask.
Differential Revision: https://reviews.llvm.org/D30438
llvm-svn: 298025
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.h')
| -rw-r--r-- | llvm/lib/CodeGen/SplitKit.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.h b/llvm/lib/CodeGen/SplitKit.h index a75738aaf44..9d409e924a3 100644 --- a/llvm/lib/CodeGen/SplitKit.h +++ b/llvm/lib/CodeGen/SplitKit.h @@ -405,6 +405,17 @@ private: /// deleteRematVictims - Delete defs that are dead after rematerializing. void deleteRematVictims(); + /// Add a copy instruction copying \p FromReg to \p ToReg before + /// \p InsertBefore. This can be invoked with a \p LaneMask which may make it + /// necessary to construct a sequence of copies to cover it exactly. + SlotIndex buildCopy(unsigned FromReg, unsigned ToReg, LaneBitmask LaneMask, + MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertBefore, + bool Late, unsigned RegIdx); + + SlotIndex buildSingleSubRegCopy(unsigned FromReg, unsigned ToReg, + MachineBasicBlock &MB, MachineBasicBlock::iterator InsertBefore, + unsigned SubIdx, LiveInterval &DestLI, bool Late, SlotIndex PrevCopy); + public: /// Create a new SplitEditor for editing the LiveInterval analyzed by SA. /// Newly created intervals will be appended to newIntervals. |

