[llvm-commits] CVS: llvm/include/llvm/Reoptimizer/Mapping/LLVMinfo.h

Brian Gaeke gaeke at cs.uiuc.edu
Wed Aug 20 14:26:01 PDT 2003


Changes in directory llvm/include/llvm/Reoptimizer/Mapping:

LLVMinfo.h updated: 1.7 -> 1.8

---
Log message:

Clean up, add comments, etc.


---
Diffs of the changes:

Index: llvm/include/llvm/Reoptimizer/Mapping/LLVMinfo.h
diff -u llvm/include/llvm/Reoptimizer/Mapping/LLVMinfo.h:1.7 llvm/include/llvm/Reoptimizer/Mapping/LLVMinfo.h:1.8
--- llvm/include/llvm/Reoptimizer/Mapping/LLVMinfo.h:1.7	Thu Jul 10 14:01:26 2003
+++ llvm/include/llvm/Reoptimizer/Mapping/LLVMinfo.h	Wed Aug 20 14:25:06 2003
@@ -1,13 +1,54 @@
-#include "llvm/Instruction.h"
-#include "Support/DataTypes.h"
+//===-- llvm/Reoptimizer/Mapping/LLVMinfo.h - Mapping library ----*- C++ -*--=//
+//
+// This file contains the list of public methods exported by
+// lib/Reoptimizer/Mapping/getLLVMinfo.cpp, which is the part of the
+// Reoptimizer that lets you access the mapping information that SPARC
+// LLC puts into assembly output (using the -enable-maps option).
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_REOPTIMIZER_MAPPING_LLVMINFO_H
+#define LLVM_REOPTIMIZER_MAPPING_LLVMINFO_H
 
+#include "Support/DataTypes.h"
+#include <vector>
+class Instruction;
 class BasicBlock;
 class Module;
 class Function;
 
+/// 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 int> getLLVMInstrPositionInfo(Instruction *LI);
-std::vector<uint64_t> getLLVMInstrInfo(Instruction *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
+/// (I think). It is a runtime error to call this function on a basic
+/// block which is not in the map.
+///
 std::pair<uint64_t, uint64_t> getBasicBlockInfo(BasicBlock *BB);
+
+/// getReverseBBMap - Look up the given 64-bit address ADDR in the
+/// reverse BB map for the Module. If it is found, return true, and
+/// set BB to the BasicBlock that corresponds to it. Otherwise, return
+/// false.
+///
 bool getReverseBBMap(uint64_t addr, Module *M, BasicBlock* &bb);
-Function *getRevFunction(Module *M, uint64_t addr);
+
+/// isInlinable - Looks up the given function in the
+/// llvmSimpleFunction table. llvmSimpleFunction and llvmFunctionCount
+/// are provided by the -emitfuncs pass.  Returns false for null or
+/// external functions.
+///
 bool isInlinable(Function *F);
+
+/// getRevFunction - Given an address and a Module, get the Function
+/// that maps to the address.  Return NULL when it's an external
+/// function.
+///
+Function *getRevFunction(Module *M, uint64_t addr);
+
+#endif // LLVM_REOPTIMIZER_MAPPING_LLVMINFO_H





More information about the llvm-commits mailing list