aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/RegisterScavenging.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/RegisterScavenging.h')
-rw-r--r--include/llvm/CodeGen/RegisterScavenging.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h
index df3fd34e0af6..122c78534253 100644
--- a/include/llvm/CodeGen/RegisterScavenging.h
+++ b/include/llvm/CodeGen/RegisterScavenging.h
@@ -74,10 +74,6 @@ public:
/// Start tracking liveness from the begin of the specific basic block.
void enterBasicBlock(MachineBasicBlock *mbb);
- /// Allow resetting register state info for multiple
- /// passes over/within the same function.
- void initRegState();
-
/// Move the internal MBB iterator and update register states.
void forward();
@@ -104,10 +100,8 @@ public:
MBBI = I;
}
- MachineBasicBlock::iterator getCurrentPosition() const {
- return MBBI;
- }
-
+ MachineBasicBlock::iterator getCurrentPosition() const { return MBBI; }
+
/// Return if a specific register is currently used.
bool isRegUsed(unsigned Reg, bool includeReserved = true) const;
@@ -152,7 +146,7 @@ public:
}
/// Tell the scavenger a register is used.
- void setRegUsed(unsigned Reg);
+ void setRegUsed(unsigned Reg, LaneBitmask LaneMask = ~0u);
private:
/// Returns true if a register is reserved. It is never "unused".
bool isReserved(unsigned Reg) const { return MRI->isReserved(Reg); }
@@ -169,10 +163,10 @@ private:
/// Processes the current instruction and fill the KillRegUnits and
/// DefRegUnits bit vectors.
void determineKillsAndDefs();
-
+
/// Add all Reg Units that Reg contains to BV.
void addRegUnits(BitVector &BV, unsigned Reg);
-
+
/// Return the candidate register that is unused for the longest after
/// StartMI. UseMI is set to the instruction where the search stopped.
///
@@ -182,6 +176,9 @@ private:
unsigned InstrLimit,
MachineBasicBlock::iterator &UseMI);
+ /// Allow resetting register state info for multiple
+ /// passes over/within the same function.
+ void initRegState();
};
} // End llvm namespace