diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2003-06-02 23:27:09 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2003-06-02 23:27:09 +0000 |
commit | 0ee48d24fe0a6de9b06bf122c4deaa9f570c8d8b (patch) | |
tree | 122aaecd87b7df131c3d511c9b150997454bd085 /lib/CodeGen | |
parent | 78ddcd7b03c84aef48b8996ca427da64eaa4f035 (diff) | |
download | external_llvm-0ee48d24fe0a6de9b06bf122c4deaa9f570c8d8b.zip external_llvm-0ee48d24fe0a6de9b06bf122c4deaa9f570c8d8b.tar.gz external_llvm-0ee48d24fe0a6de9b06bf122c4deaa9f570c8d8b.tar.bz2 |
Moved FInfo.cpp to lib/Target/Sparc as it is Sparc-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rwxr-xr-x | lib/CodeGen/Mapping/FInfo.cpp | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/lib/CodeGen/Mapping/FInfo.cpp b/lib/CodeGen/Mapping/FInfo.cpp deleted file mode 100755 index e72303d..0000000 --- a/lib/CodeGen/Mapping/FInfo.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#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 writePrologue(const char *area, const char *label); - void 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"<<f<<"\n"; - ++f; - } - writeEpilogue("FUNCTION MAP", "FunctionBB"); - - writePrologue("FUNCTION MAP", "FunctionLI"); - f=0; - for(Module::iterator FI=M.begin(), FE=M.end(); FE!=FI; ++FI){ - if(FI->isExternal()) continue; - Out << "\t.xword LMIMap"<<f<<"\n"; - ++f; - } - writeEpilogue("FUNCTION MAP", "FunctionLI"); - - - return false; -} - - -void FunctionInfo::writePrologue(const char *area, - const char *label){ - Out << "\n\n\n!"<<area<<"\n"; - Out << "\t.section \".rodata\"\n\t.align 8\n"; - Out << "\t.global "<<label<<"\n"; - Out << "\t.type "<<label<<",#object\n"; - Out << label<<":\n"; - //Out << "\t.word .end_"<<label<<"-"<<label<<"\n"; -} - -void FunctionInfo::writeEpilogue(const char *area, - const char *label){ - Out << ".end_" << label << ":\n"; - Out << "\t.size " << label << ", .end_" - << label << "-" << label << "\n\n\n\n"; - - //Out << "\n\n!" << area << " Length\n"; - //Out << "\t.section \".bbdata\",#alloc,#write\n"; - //Out << "\t.global " << label << "_length\n"; - //Out << "\t.align 4\n"; - //Out << "\t.type " << label << "_length,#object\n"; - //Out << "\t.size "<< label <<"_length,4\n"; - //Out << label <<" _length:\n"; - //Out << "\t.word\t.end_"<<label<<"-"<<label<<"\n\n\n\n"; -} |