[llvm] r247322 - [IR] Conservatively mark 'catchpad' as accessing memory

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 11:50:09 PDT 2015


Author: majnemer
Date: Thu Sep 10 13:50:09 2015
New Revision: 247322

URL: http://llvm.org/viewvc/llvm-project?rev=247322&view=rev
Log:
[IR] Conservatively mark 'catchpad' as accessing memory

The exact semantics of 'catchpad' are really in the hands of the
personality routine so we shouldn't assume that they have no side
effects.

Modified:
    llvm/trunk/lib/IR/Instruction.cpp

Modified: llvm/trunk/lib/IR/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Instruction.cpp?rev=247322&r1=247321&r2=247322&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Instruction.cpp (original)
+++ llvm/trunk/lib/IR/Instruction.cpp Thu Sep 10 13:50:09 2015
@@ -414,6 +414,7 @@ bool Instruction::mayReadFromMemory() co
   case Instruction::Fence: // FIXME: refine definition of mayReadFromMemory
   case Instruction::AtomicCmpXchg:
   case Instruction::AtomicRMW:
+  case Instruction::CatchPad:
   case Instruction::CatchRet:
   case Instruction::TerminatePad:
     return true;
@@ -436,6 +437,7 @@ bool Instruction::mayWriteToMemory() con
   case Instruction::VAArg:
   case Instruction::AtomicCmpXchg:
   case Instruction::AtomicRMW:
+  case Instruction::CatchPad:
   case Instruction::CatchRet:
   case Instruction::TerminatePad:
     return true;




More information about the llvm-commits mailing list