mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
Teach inline function how to update the callgraph when it makes changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c54b1c1f8b
commit
4c2881ecb9
@ -32,6 +32,7 @@ class InvokeInst;
|
|||||||
class ReturnInst;
|
class ReturnInst;
|
||||||
class CallSite;
|
class CallSite;
|
||||||
class Trace;
|
class Trace;
|
||||||
|
class CallGraph;
|
||||||
|
|
||||||
/// CloneModule - Return an exact copy of the specified module
|
/// CloneModule - Return an exact copy of the specified module
|
||||||
///
|
///
|
||||||
@ -136,6 +137,12 @@ void CloneTraceInto(Function *NewFunc, Trace &T,
|
|||||||
std::map<const Value*, Value*> &ValueMap,
|
std::map<const Value*, Value*> &ValueMap,
|
||||||
const char *NameSuffix);
|
const char *NameSuffix);
|
||||||
|
|
||||||
|
/// CloneTrace - Returns a copy of the specified trace.
|
||||||
|
/// It takes a vector of basic blocks clones the basic blocks, removes internal
|
||||||
|
/// phi nodes, adds it to the same function as the original (although there is
|
||||||
|
/// no jump to it) and returns the new vector of basic blocks.
|
||||||
|
std::vector<BasicBlock *> CloneTrace(const std::vector<BasicBlock*> &origTrace);
|
||||||
|
|
||||||
/// InlineFunction - This function inlines the called function into the basic
|
/// InlineFunction - This function inlines the called function into the basic
|
||||||
/// block of the caller. This returns false if it is not possible to inline
|
/// block of the caller. This returns false if it is not possible to inline
|
||||||
/// this call. The program is still in a well defined state if this occurs
|
/// this call. The program is still in a well defined state if this occurs
|
||||||
@ -146,15 +153,12 @@ void CloneTraceInto(Function *NewFunc, Trace &T,
|
|||||||
/// exists in the instruction stream. Similiarly this will inline a recursive
|
/// exists in the instruction stream. Similiarly this will inline a recursive
|
||||||
/// function by one level.
|
/// function by one level.
|
||||||
///
|
///
|
||||||
bool InlineFunction(CallInst *C);
|
/// If a non-null callgraph pointer is provided, these functions update the
|
||||||
bool InlineFunction(InvokeInst *II);
|
/// CallGraph to represent the program after inlining.
|
||||||
bool InlineFunction(CallSite CS);
|
///
|
||||||
|
bool InlineFunction(CallInst *C, CallGraph *CG = 0);
|
||||||
/// CloneTrace - Returns a copy of the specified trace.
|
bool InlineFunction(InvokeInst *II, CallGraph *CG = 0);
|
||||||
/// It takes a vector of basic blocks clones the basic blocks, removes internal
|
bool InlineFunction(CallSite CS, CallGraph *CG = 0);
|
||||||
/// phi nodes, adds it to the same function as the original (although there is
|
|
||||||
/// no jump to it) and returns the new vector of basic blocks.
|
|
||||||
std::vector<BasicBlock *> CloneTrace(const std::vector<BasicBlock*> &origTrace);
|
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user