[llvm-commits] CVS: reopt/lib/Mapping/getLLVMinfo.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Fri Oct 15 12:31:31 PDT 2004



Changes in directory reopt/lib/Mapping:

getLLVMinfo.cpp updated: 1.26 -> 1.27
---
Log message:

Get rid of FunctionLI and getLLVMInstrPositionInfo, whose sole
purpose in life is to query the old, broken MachineCodeForInstruction
mapping information.


---
Diffs of the changes:  (+0 -27)

Index: reopt/lib/Mapping/getLLVMinfo.cpp
diff -u reopt/lib/Mapping/getLLVMinfo.cpp:1.26 reopt/lib/Mapping/getLLVMinfo.cpp:1.27
--- reopt/lib/Mapping/getLLVMinfo.cpp:1.26	Wed Mar 31 10:31:29 2004
+++ reopt/lib/Mapping/getLLVMinfo.cpp	Fri Oct 15 14:31:21 2004
@@ -22,7 +22,6 @@
 extern int llvmFunctionCount;
 // Global symbols added to the program by FunctionInfo pass:
 extern unsigned char *FunctionBB[];
-extern unsigned char *FunctionLI[];
 
 namespace llvm {
 
@@ -98,32 +97,6 @@
 static void createMImapF(unsigned char *LMIinfo, unsigned length);
 static void createBBmapRevFwdF(Module *M);
 
-/// getLLVMInstrPositionInfo - Look up the given Instruction in the
-/// LLVM-to-MI map for the Function that contains it, and return the
-/// vector of integers (?) that represents it.
-///
-std::vector<unsigned> getLLVMInstrPositionInfo (Instruction *LI) {
-  // Get pointers to the BasicBlock, Function, and Module which contain LI.
-  BasicBlock *BB = LI->getParent();
-  Function *F = BB->getParent();
-  Module *M = F->getParent();
-
-  maybeFillInMapsForModule (M);
-
-  unsigned FunctionNo = FunctionKey[F];
-  static unsigned lastUsedFunctionNo = ~0;
-  if (lastUsedFunctionNo != FunctionNo) {
-    // First time we see a given Function, we have to initialize
-    // MImapF for that Function.
-    unsigned char *LIMap = FunctionLI[FunctionNo];
-    unsigned length = *(unsigned *)LIMap - 4;
-    createMImapF(&LIMap[4], length);
-    lastUsedFunctionNo = FunctionNo;
-  }
-
-  return MImapF[BasicBlockKey[BB]][llvmInstructionKey[LI]];
-}
-
 /// getBasicBlockInfo(BasicBlock *) - Find the given BasicBlock in the
 /// forward basic block map, and return the pair of 64-bit addresses
 /// that corresponds to that basic block's starting and ending address






More information about the llvm-commits mailing list