diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-06 05:01:54 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-06 05:01:54 +0000 |
commit | 9576b15fcd384cc1c237ef11a528f4fad319d7ad (patch) | |
tree | b047cb7dfbc3e07b15bd3f6ac84c060a1c916054 /lib/Target | |
parent | 8f410cac044a21a94afece41345ccd9b72047675 (diff) | |
download | external_llvm-9576b15fcd384cc1c237ef11a528f4fad319d7ad.zip external_llvm-9576b15fcd384cc1c237ef11a528f4fad319d7ad.tar.gz external_llvm-9576b15fcd384cc1c237ef11a528f4fad319d7ad.tar.bz2 |
Bug fix: Printing AdIBef and AdIAft outside the scope where they
were declared, and in some cases when they were unintialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/SparcV9/SparcV9RegInfo.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp index 9c57892..9f7d5c9 100644 --- a/lib/Target/SparcV9/SparcV9RegInfo.cpp +++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp @@ -1081,6 +1081,7 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst, MachineInstr *AdIBefCC, *AdIAftCC, *AdICpCC; + MachineInstr *AdIBef, *AdIAft; //---- Insert code for pushing the reg on stack ---------- @@ -1117,8 +1118,7 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst, } else { // for any other register type, just add the push inst - MachineInstr *AdIBef = - cpReg2MemMI(Reg, getStackPointer(), StackOff, RegType ); + AdIBef = cpReg2MemMI(Reg, getStackPointer(), StackOff, RegType ); ((PRA.AddedInstrMap[MInst])->InstrnsBefore).push_front(AdIBef); } @@ -1151,11 +1151,8 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst, } else { // for any other register type, just add the pop inst - MachineInstr *AdIAft = - cpMem2RegMI(getStackPointer(), StackOff, Reg, RegType ); - + AdIAft = cpMem2RegMI(getStackPointer(), StackOff, Reg, RegType ); ((PRA.AddedInstrMap[MInst])->InstrnsAfter).push_back(AdIAft); - } PushedRegSet.insert( Reg ); @@ -1163,7 +1160,10 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst, if(1) { cerr << "\nFor call inst:" << *MInst; cerr << "\n -inserted caller saving instrs:\n\t "; - cerr << *AdIBefCC << "\n\t" << *AdIAftCC ; + if( RegType == IntCCRegType ) + cerr << *AdIBefCC << "\n\t" << *AdIAftCC ; + else + cerr << *AdIBef << "\n\t" << *AdIAft ; } } // if not already pushed |