forked from OSchip/llvm-project
parent
2e9014cb1b
commit
0016085602
|
@ -241,6 +241,13 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P = 0);
|
|||
Pass *createLoopPreheaderInsertionPass();
|
||||
extern const PassInfo *LoopPreheadersID;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This pass eliminates call instructions to the current function which occur
|
||||
// immediately before return instructions.
|
||||
//
|
||||
FunctionPass *createTailCallEliminationPass();
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// This pass convert malloc and free instructions to %malloc & %free function
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/Instructions.h"
|
||||
|
@ -34,6 +35,8 @@ namespace {
|
|||
RegisterOpt<TailCallElim> X("tailcallelim", "Tail Call Elimination");
|
||||
}
|
||||
|
||||
FunctionPass *createTailCallEliminationPass() { return new TailCallElim(); }
|
||||
|
||||
|
||||
bool TailCallElim::runOnFunction(Function &F) {
|
||||
// If this function is a varargs function, we won't be able to PHI the args
|
||||
|
|
Loading…
Reference in New Issue