[llvm-commits] [llvm] r92492 - /llvm/trunk/lib/VMCore/Instruction.cpp
Dan Gohman
gohman at apple.com
Mon Jan 4 10:38:40 PST 2010
Author: djg
Date: Mon Jan 4 12:38:39 2010
New Revision: 92492
URL: http://llvm.org/viewvc/llvm-project?rev=92492&view=rev
Log:
Add a comment.
Modified:
llvm/trunk/lib/VMCore/Instruction.cpp
Modified: llvm/trunk/lib/VMCore/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=92492&r1=92491&r2=92492&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instruction.cpp (original)
+++ llvm/trunk/lib/VMCore/Instruction.cpp Mon Jan 4 12:38:39 2010
@@ -399,6 +399,8 @@
case Load: {
if (cast<LoadInst>(this)->isVolatile())
return false;
+ // Note that it is not safe to speculate into a malloc'd region because
+ // malloc may return null.
if (isa<AllocaInst>(getOperand(0)))
return true;
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(getOperand(0)))
More information about the llvm-commits
mailing list