[llvm-commits] [llvm] r137863 - in /llvm/trunk/lib: Analysis/LoopInfo.cpp Transforms/InstCombine/InstructionCombining.cpp VMCore/Instruction.cpp
Bill Wendling
isanbard at gmail.com
Wed Aug 17 13:36:44 PDT 2011
Author: void
Date: Wed Aug 17 15:36:44 2011
New Revision: 137863
URL: http://llvm.org/viewvc/llvm-project?rev=137863&view=rev
Log:
Revert r137655. There is some question about whether the 'landingpad'
instruction should be marked as potentially reading and/or writing memory.
Modified:
llvm/trunk/lib/Analysis/LoopInfo.cpp
llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/trunk/lib/VMCore/Instruction.cpp
Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=137863&r1=137862&r2=137863&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopInfo.cpp Wed Aug 17 15:36:44 2011
@@ -99,6 +99,9 @@
return false;
if (I->mayReadFromMemory())
return false;
+ // The landingpad instruction is immobile.
+ if (isa<LandingPadInst>(I))
+ return false;
// Determine the insertion point, unless one was given.
if (!InsertPt) {
BasicBlock *Preheader = getLoopPreheader();
Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=137863&r1=137862&r2=137863&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Wed Aug 17 15:36:44 2011
@@ -1418,7 +1418,8 @@
assert(I->hasOneUse() && "Invariants didn't hold!");
// Cannot move control-flow-involving, volatile loads, vaarg, etc.
- if (isa<PHINode>(I) || I->mayHaveSideEffects() || isa<TerminatorInst>(I))
+ if (isa<PHINode>(I) || isa<LandingPadInst>(I) || I->mayHaveSideEffects() ||
+ isa<TerminatorInst>(I))
return false;
// Do not sink alloca instructions out of the entry block.
Modified: llvm/trunk/lib/VMCore/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=137863&r1=137862&r2=137863&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instruction.cpp (original)
+++ llvm/trunk/lib/VMCore/Instruction.cpp Wed Aug 17 15:36:44 2011
@@ -320,7 +320,6 @@
case Instruction::Fence: // FIXME: refine definition of mayReadFromMemory
case Instruction::AtomicCmpXchg:
case Instruction::AtomicRMW:
- case Instruction::LandingPad:
return true;
case Instruction::Call:
return !cast<CallInst>(this)->doesNotAccessMemory();
@@ -341,7 +340,6 @@
case Instruction::VAArg:
case Instruction::AtomicCmpXchg:
case Instruction::AtomicRMW:
- case Instruction::LandingPad:
return true;
case Instruction::Call:
return !cast<CallInst>(this)->onlyReadsMemory();
More information about the llvm-commits
mailing list