diff options
Diffstat (limited to 'llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp index c10900c18d6..17b50bd9559 100644 --- a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp +++ b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp @@ -99,12 +99,24 @@ bool AggressiveAntiDepState::IsLive(unsigned Reg) AggressiveAntiDepBreaker:: -AggressiveAntiDepBreaker(MachineFunction& MFi) : +AggressiveAntiDepBreaker(MachineFunction& MFi, + TargetSubtarget::ExcludedRCVector& ExcludedRCs) : AntiDepBreaker(), MF(MFi), MRI(MF.getRegInfo()), TRI(MF.getTarget().getRegisterInfo()), AllocatableSet(TRI->getAllocatableSet(MF)), State(NULL), SavedState(NULL) { + /* Remove all registers from excluded RCs from the allocatable + register set. */ + for (unsigned i = 0, e = ExcludedRCs.size(); i < e; ++i) { + BitVector NotRenameable = TRI->getAllocatableSet(MF, ExcludedRCs[i]).flip(); + AllocatableSet &= NotRenameable; + } + + DEBUG(errs() << "AntiDep Renameable Registers:"); + DEBUG(for (int r = AllocatableSet.find_first(); r != -1; + r = AllocatableSet.find_next(r)) + errs() << " " << TRI->getName(r)); } AggressiveAntiDepBreaker::~AggressiveAntiDepBreaker() { |