[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcRegInfo.cpp

Anand Shukla ashukla at cs.uiuc.edu
Sat May 31 21:49:01 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

SparcRegInfo.cpp updated: 1.96 -> 1.97

---
Log message:

Add map info for arguments to call (copies)

---
Diffs of the changes:

Index: llvm/lib/Target/Sparc/SparcRegInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.96 llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.97
--- llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.96	Sat May 31 02:30:29 2003
+++ llvm/lib/Target/Sparc/SparcRegInfo.cpp	Sat May 31 21:48:23 2003
@@ -12,6 +12,7 @@
 #include "llvm/CodeGen/PhyRegAlloc.h"
 #include "llvm/CodeGen/InstrSelection.h"
 #include "llvm/CodeGen/MachineInstrBuilder.h"
+#include "llvm/CodeGen/MachineCodeForInstruction.h"
 #include "llvm/CodeGen/MachineInstrAnnot.h"
 #include "llvm/CodeGen/FunctionLiveVarInfo.h"   // FIXME: Remove
 #include "../../CodeGen/RegAlloc/RegAllocCommon.h"   // FIXME!
@@ -940,10 +941,19 @@
   // 
   for(unsigned i=0; i < ReorderedVec.size(); i++)
     CallAI->InstrnsBefore.push_back( ReorderedVec[i] );
+
+  //Insert machine instructions before and after call into the
+  //call instructions map --- Anand
+  const CallInst *callInst = argDesc->getCallInst();
+  MachineCodeForInstruction &mvec = MachineCodeForInstruction::get(callInst);
+  mvec.insert(mvec.begin(), CallAI->InstrnsBefore.begin(), 
+	      CallAI->InstrnsBefore.end());
+  mvec.insert(mvec.end(), CallAI->InstrnsAfter.begin(), 
+	      CallAI->InstrnsAfter.end());
 }
 
 //---------------------------------------------------------------------------
-// This method is called for an LLVM return instruction to identify which
+// this method is called for an LLVM return instruction to identify which
 // values will be returned from this method and to suggest colors.
 //---------------------------------------------------------------------------
 void UltraSparcRegInfo::suggestReg4RetValue(MachineInstr *RetMI, 





More information about the llvm-commits mailing list