[llvm-commits] CVS: llvm/lib/CodeGen/PrologEpilogInserter.cpp

Jim Laskey jlaskey at apple.com
Fri Aug 25 15:56:44 PDT 2006



Changes in directory llvm/lib/CodeGen:

PrologEpilogInserter.cpp updated: 1.56 -> 1.57
---
Log message:

Tidy up.


---
Diffs of the changes:  (+4 -2)

 PrologEpilogInserter.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.56 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.57
--- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.56	Fri Aug 25 14:45:51 2006
+++ llvm/lib/CodeGen/PrologEpilogInserter.cpp	Fri Aug 25 17:56:30 2006
@@ -139,7 +139,7 @@
   const bool *PhysRegsUsed = Fn.getUsedPhysregs();
   const TargetRegisterClass* const *CSRegClasses =
     RegInfo->getCalleeSaveRegClasses();
-  std::vector<CalleeSavedInfo> &CSI = FFI->getCalleeSavedInfo();
+  std::vector<CalleeSavedInfo> CSI;
   for (unsigned i = 0; CSRegs[i]; ++i) {
     unsigned Reg = CSRegs[i];
     if (PhysRegsUsed[Reg]) {
@@ -186,6 +186,8 @@
     }
     CSI[i].setFrameIdx(FrameIdx);
   }
+
+  FFI->setCalleeSavedInfo(CSI);
 }
 
 /// saveCallerSavedRegisters -  Insert spill code for any caller saved registers
@@ -194,7 +196,7 @@
 void PEI::saveCallerSavedRegisters(MachineFunction &Fn) {
   // Get callee saved register information.
   MachineFrameInfo *FFI = Fn.getFrameInfo();
-  std::vector<CalleeSavedInfo> &CSI = FFI->getCalleeSavedInfo();
+  const std::vector<CalleeSavedInfo> &CSI = FFI->getCalleeSavedInfo();
   
   // Early exit if no caller saved registers are modified!
   if (CSI.empty())






More information about the llvm-commits mailing list