aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/SparcV9RegInfo.cpp
diff options
context:
space:
mode:
authorRuchira Sasanka <sasanka@students.uiuc.edu>2002-01-07 21:03:42 +0000
committerRuchira Sasanka <sasanka@students.uiuc.edu>2002-01-07 21:03:42 +0000
commitbf915524a1323c4495a1b97532ecc38c8ce4204c (patch)
tree2e46f82b803c77393be92d17f3fce1341c861f40 /lib/Target/SparcV9/SparcV9RegInfo.cpp
parent690f367f6b049723dded669674d5e66329e5c557 (diff)
downloadexternal_llvm-bf915524a1323c4495a1b97532ecc38c8ce4204c.zip
external_llvm-bf915524a1323c4495a1b97532ecc38c8ce4204c.tar.gz
external_llvm-bf915524a1323c4495a1b97532ecc38c8ce4204c.tar.bz2
Added more comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/SparcV9RegInfo.cpp')
-rw-r--r--lib/Target/SparcV9/SparcV9RegInfo.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp
index 6a0460d..6543397 100644
--- a/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -1161,30 +1161,27 @@ MachineInstr * UltraSparcRegInfo::cpValue2Value(Value *Src, Value *Dest) const{
//----------------------------------------------------------------------------
// This method inserts caller saving/restoring instructons before/after
-// a call machine instruction.
+// a call machine instruction. The caller saving/restoring instructions are
+// inserted like:
+//
+// ** caller saving instructions
+// other instructions inserted for the call by ColorCallArg
+// CALL instruction
+// other instructions inserted for the call ColorCallArg
+// ** caller restoring instructions
+//
//----------------------------------------------------------------------------
void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst,
const BasicBlock *BB,
PhyRegAlloc &PRA) const {
- // assert( (getInstrInfo()).isCall( MInst->getOpCode() ) );
-
- // Clear the temp area of the stack
- //PRA.mcInfo.popAllTempValues(target);
- // TODO*** Don't do this since we can have a situation like
- /*
-
- stx %o1 %i6 1999 <--- inserted by this code
- stx %o5 %i6 2007
-
- *****
- stx %o1 %i6 2007 ???? <-- inserted by statck2stack call arg
- */
+ // has set to record which registers were saved/restored
+ //
+ hash_set<unsigned> PushedRegSet;
- hash_set<unsigned> PushedRegSet;
// Now find the LR of the return value of the call
// The last *implicit operand* is the return value of a call
@@ -1350,11 +1347,6 @@ void UltraSparcRegInfo::insertCallerSavingCode(const MachineInstr *MInst,
} // for each value in the LV set after instruction
- // Clear the temp area of the stack
- // PRA.mcInfo.popAllTempValues(target);
- // TODO *** see above call - optimize later
-
-
}
//---------------------------------------------------------------------------