mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Expose the TCE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8619 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2240d2b3f7
commit
3fc6ef1bb9
@ -241,6 +241,13 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P = 0);
|
|||||||
Pass *createLoopPreheaderInsertionPass();
|
Pass *createLoopPreheaderInsertionPass();
|
||||||
extern const PassInfo *LoopPreheadersID;
|
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
|
// 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/DerivedTypes.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/Instructions.h"
|
#include "llvm/Instructions.h"
|
||||||
@ -34,6 +35,8 @@ namespace {
|
|||||||
RegisterOpt<TailCallElim> X("tailcallelim", "Tail Call Elimination");
|
RegisterOpt<TailCallElim> X("tailcallelim", "Tail Call Elimination");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FunctionPass *createTailCallEliminationPass() { return new TailCallElim(); }
|
||||||
|
|
||||||
|
|
||||||
bool TailCallElim::runOnFunction(Function &F) {
|
bool TailCallElim::runOnFunction(Function &F) {
|
||||||
// If this function is a varargs function, we won't be able to PHI the args
|
// If this function is a varargs function, we won't be able to PHI the args
|
||||||
|
Loading…
x
Reference in New Issue
Block a user