diff --git a/lib/CodeGen/InstrSelection/InstrSelection.cpp b/lib/CodeGen/InstrSelection/InstrSelection.cpp index f32165eda1b..f27ad710e0a 100644 --- a/lib/CodeGen/InstrSelection/InstrSelection.cpp +++ b/lib/CodeGen/InstrSelection/InstrSelection.cpp @@ -23,6 +23,7 @@ #include "llvm/Method.h" #include "llvm/iOther.h" #include "llvm/Target/MachineRegInfo.h" +#include //******************** Internal Data Declarations ************************/ @@ -252,6 +253,11 @@ void InsertCode4AllPhisInMeth(Method *method, TargetMachine &target) { Value *PhiCpRes = new Value(PN->getType(), PN->getValueType() ); + string *Name = new string("PhiCp:"); + (*Name) += (int) PhiCpRes; + PhiCpRes->setName( *Name ); + + // for each incoming value of the phi, insert phi elimination // for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i) { diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 383bd2a32d9..de77f6ab6cb 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -95,8 +95,8 @@ operator<< (ostream& os, const MachineInstr& minstr) for (unsigned i=0, N=minstr.getNumOperands(); i < N; i++) { os << "\t" << minstr.getOperand(i); - if( minstr.getOperand(i).opIsDef() ) os << "*"; - + if( minstr.getOperand(i).opIsDef() ) + os << "*"; } #undef DEBUG_VAL_OP_ITERATOR @@ -122,7 +122,7 @@ operator<< (ostream& os, const MachineInstr& minstr) for(unsigned z=0; z < NumOfImpRefs; z++) { os << minstr.getImplicitRef(z); if( minstr.implicitRefIsDefined(z)) os << "*"; - cout << "\t"; + os << "\t"; } } diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp index f32165eda1b..f27ad710e0a 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp @@ -23,6 +23,7 @@ #include "llvm/Method.h" #include "llvm/iOther.h" #include "llvm/Target/MachineRegInfo.h" +#include //******************** Internal Data Declarations ************************/ @@ -252,6 +253,11 @@ void InsertCode4AllPhisInMeth(Method *method, TargetMachine &target) { Value *PhiCpRes = new Value(PN->getType(), PN->getValueType() ); + string *Name = new string("PhiCp:"); + (*Name) += (int) PhiCpRes; + PhiCpRes->setName( *Name ); + + // for each incoming value of the phi, insert phi elimination // for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i) {