diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-08-29 19:28:28 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-08-29 19:28:28 +0000 | 
| commit | d94a7c3dc1b3c22f6884781e686d7b9a96b625b0 (patch) | |
| tree | de791ad4103e0320e56d4a7e60f4770f736c9149 | |
| parent | 99129efdd37e021f54b31fe7a5b6f455e83694bc (diff) | |
| download | bcm5719-llvm-d94a7c3dc1b3c22f6884781e686d7b9a96b625b0.tar.gz bcm5719-llvm-d94a7c3dc1b3c22f6884781e686d7b9a96b625b0.zip  | |
inline function into its only caller.
llvm-svn: 112455
| -rw-r--r-- | llvm/lib/CodeGen/DwarfEHPrepare.cpp | 19 | 
1 files changed, 6 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp index 57f45ec199d..01e60e36771 100644 --- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp +++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp @@ -112,26 +112,19 @@ namespace {      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) {  | 

