#include "llvm/Reoptimizer/Mapping/FInfo.h" #include "llvm/Pass.h" #include "llvm/Module.h" namespace { class FunctionInfo : public Pass { std::ostream &Out; public: FunctionInfo(std::ostream &out) : Out(out){} const char* getPassName() const{return "Sparc FunctionInfo";} bool run(Module &M); private: void FunctionInfo::writePrologue(const char *area, const char *label); void FunctionInfo::writeEpilogue(const char *area, const char *label); }; } Pass *getFunctionInfo(std::ostream &out){ return new FunctionInfo(out); } bool FunctionInfo::run(Module &M){ unsigned f; writePrologue("FUNCTION MAP", "FunctionBB"); f=0; for(Module::iterator FI=M.begin(), FE=M.end(); FE!=FI; ++FI){ if(FI->isExternal()) continue; Out << "\t.xword BBMIMap"<isExternal()) continue; Out << "\t.xword LMIMap"<