From 4c214d2bf0da92a7973bb7902c0d6d055b1fa991 Mon Sep 17 00:00:00 2001 From: Alkis Evlogimenos Date: Sat, 13 Dec 2003 11:11:02 +0000 Subject: Ignore non-allocatable physical registers in live interval analysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10449 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveIntervalAnalysis.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 2a31e66851..52cf73be8b 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -183,6 +183,10 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb, unsigned reg) { DEBUG(std::cerr << "\t\t\tregister: ";printRegName(reg); std::cerr << '\n'); + if (!lv_->getAllocatablePhysicalRegisters()[reg]) { + DEBUG(std::cerr << "\t\t\t\tnon allocatable register: ignoring\n"); + return; + } unsigned start = getInstructionIndex(*mi); unsigned end = start; -- cgit v1.2.3-70-g09d2