[llvm-commits] [llvm] r112455 - /llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Chris Lattner
sabre at nondot.org
Sun Aug 29 12:28:28 PDT 2010
Author: lattner
Date: Sun Aug 29 14:28:28 2010
New Revision: 112455
URL: http://llvm.org/viewvc/llvm-project?rev=112455&view=rev
Log:
inline function into its only caller.
Modified:
llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp?rev=112455&r1=112454&r2=112455&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp Sun Aug 29 14:28:28 2010
@@ -112,26 +112,19 @@
bool FindSelectorAndURoR(Instruction *Inst, bool &URoRInvoke,
SmallPtrSet<IntrinsicInst*, 8> &SelCalls);
- /// DoMem2RegPromotion - Take an alloca call and promote it from memory to a
- /// register.
- bool DoMem2RegPromotion(Value *V) {
- AllocaInst *AI = dyn_cast<AllocaInst>(V);
+ /// PromoteStoreInst - Perform Mem2Reg on a StoreInst.
+ bool PromoteStoreInst(StoreInst *SI) {
+ if (!SI || !DT || !DF) return false;
+
+ AllocaInst *AI = dyn_cast<AllocaInst>(SI->getOperand(1));
if (!AI || !isAllocaPromotable(AI)) return false;
-
+
// Turn the alloca into a register.
std::vector<AllocaInst*> Allocas(1, AI);
PromoteMemToReg(Allocas, *DT, *DF);
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
/// register. This should get rid of the store and subsequent loads.
bool PromoteEHPtrStore(IntrinsicInst *II) {
More information about the llvm-commits
mailing list