diff options
author | Chris Lattner <sabre@nondot.org> | 2002-01-21 23:17:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-01-21 23:17:48 +0000 |
commit | ee965abc367045a647fd33a5df3295e097925e3a (patch) | |
tree | 0632ccb72c12c4fbce7c66745c3534bb2b63e6f6 /llvm/lib/Transforms/IPO/InlineSimple.cpp | |
parent | 4f32cf118a4fbf1419b3ed18db2363cb5ad47de0 (diff) | |
download | bcm5719-llvm-ee965abc367045a647fd33a5df3295e097925e3a.tar.gz bcm5719-llvm-ee965abc367045a647fd33a5df3295e097925e3a.zip |
Move stuff out of the Optimizations directories into the appropriate Transforms
directories. Eliminate the opt namespace.
llvm-svn: 1520
Diffstat (limited to 'llvm/lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/InlineSimple.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp index 9d86c868953..a71acd2a79f 100644 --- a/llvm/lib/Transforms/IPO/InlineSimple.cpp +++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp @@ -9,17 +9,16 @@ // . Has a smart heuristic for when to inline a method // // Notice that: -// * This pass has a habit of introducing duplicated constant pool entries, -// and also opens up a lot of opportunities for constant propogation. It is -// a good idea to to run a constant propogation pass, then a DCE pass +// * This pass opens up a lot of opportunities for constant propogation. It +// is a good idea to to run a constant propogation pass, then a DCE pass // sometime after running this pass. // // TODO: Currently this throws away all of the symbol names in the method being -// inlined to try to avoid name clashes. Use a name if it's not taken +// inlined. This shouldn't happen. // //===----------------------------------------------------------------------===// -#include "llvm/Optimizations/MethodInlining.h" +#include "llvm/Transforms/MethodInlining.h" #include "llvm/Module.h" #include "llvm/Method.h" #include "llvm/iTerminators.h" @@ -32,8 +31,6 @@ using std::cerr; #include "llvm/Assembly/Writer.h" -using namespace opt; - // RemapInstruction - Convert the instruction operands from referencing the // current values into those specified by ValueMap. // @@ -65,7 +62,7 @@ static inline void RemapInstruction(Instruction *I, // exists in the instruction stream. Similiarly this will inline a recursive // method by one level. // -bool opt::InlineMethod(BasicBlock::iterator CIIt) { +bool InlineMethod(BasicBlock::iterator CIIt) { assert(isa<CallInst>(*CIIt) && "InlineMethod only works on CallInst nodes!"); assert((*CIIt)->getParent() && "Instruction not embedded in basic block!"); assert((*CIIt)->getParent()->getParent() && "Instruction not in method!"); @@ -207,7 +204,7 @@ bool opt::InlineMethod(BasicBlock::iterator CIIt) { return true; } -bool opt::InlineMethod(CallInst *CI) { +bool InlineMethod(CallInst *CI) { assert(CI->getParent() && "CallInst not embeded in BasicBlock!"); BasicBlock *PBB = CI->getParent(); @@ -248,7 +245,7 @@ static inline bool DoMethodInlining(BasicBlock *BB) { return false; } -bool opt::MethodInlining::doMethodInlining(Method *M) { +bool MethodInlining::doMethodInlining(Method *M) { bool Changed = false; // Loop through now and inline instructions a basic block at a time... |