Changed code to ignore Phi Nodes in PhyRegAlloc
llvm-svn: 1253
diff --git a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
index 8e4530c..bc82565 100644
--- a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
+++ b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
@@ -355,6 +355,11 @@
MachineInstr *MInst = *MInstIterator;
+ // do not process Phis
+ if( (TM.getInstrInfo()).isPhi( MInst->getOpCode()) )
+ continue;
+
+
// if this machine instr is call, insert caller saving code
if( (TM.getInstrInfo()).isCall( MInst->getOpCode()) )
@@ -579,7 +584,7 @@
} // if !DEF
cerr << "\nFor Inst " << *MInst;
- cerr << "\n - SPILLED LR:"; LR->printSet();
+ cerr << " - SPILLED LR: "; LR->printSet();
cerr << "\n - Added Instructions:";
if( MIBef ) cerr << *MIBef;
cerr << *AdIMid;