mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-23 11:38:38 +00:00
inline function into its only caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112455 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cb7f653422
commit
c34c2200a8
@ -112,10 +112,11 @@ namespace {
|
|||||||
bool FindSelectorAndURoR(Instruction *Inst, bool &URoRInvoke,
|
bool FindSelectorAndURoR(Instruction *Inst, bool &URoRInvoke,
|
||||||
SmallPtrSet<IntrinsicInst*, 8> &SelCalls);
|
SmallPtrSet<IntrinsicInst*, 8> &SelCalls);
|
||||||
|
|
||||||
/// DoMem2RegPromotion - Take an alloca call and promote it from memory to a
|
/// PromoteStoreInst - Perform Mem2Reg on a StoreInst.
|
||||||
/// register.
|
bool PromoteStoreInst(StoreInst *SI) {
|
||||||
bool DoMem2RegPromotion(Value *V) {
|
if (!SI || !DT || !DF) return false;
|
||||||
AllocaInst *AI = dyn_cast<AllocaInst>(V);
|
|
||||||
|
AllocaInst *AI = dyn_cast<AllocaInst>(SI->getOperand(1));
|
||||||
if (!AI || !isAllocaPromotable(AI)) return false;
|
if (!AI || !isAllocaPromotable(AI)) return false;
|
||||||
|
|
||||||
// Turn the alloca into a register.
|
// Turn the alloca into a register.
|
||||||
@ -124,14 +125,6 @@ namespace {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// PromoteStoreInst - Perform Mem2Reg on a StoreInst.
|
|
||||||
bool PromoteStoreInst(StoreInst *SI) {
|
|
||||||
if (!SI || !DT || !DF) return false;
|
|
||||||
if (DoMem2RegPromotion(SI->getOperand(1)))
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// PromoteEHPtrStore - Promote the storing of an EH pointer into a
|
/// PromoteEHPtrStore - Promote the storing of an EH pointer into a
|
||||||
/// register. This should get rid of the store and subsequent loads.
|
/// register. This should get rid of the store and subsequent loads.
|
||||||
bool PromoteEHPtrStore(IntrinsicInst *II) {
|
bool PromoteEHPtrStore(IntrinsicInst *II) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user