aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-01-04 18:38:39 +0000
committerDan Gohman <gohman@apple.com>2010-01-04 18:38:39 +0000
commit00bd748d9a306e83756308568451ad0b54a4116e (patch)
treec31af6d876989a808c530c76734bc2c4b62aed22 /lib
parente446eec49091d277b2fe9c4b74f78b5159f59248 (diff)
downloadexternal_llvm-00bd748d9a306e83756308568451ad0b54a4116e.zip
external_llvm-00bd748d9a306e83756308568451ad0b54a4116e.tar.gz
external_llvm-00bd748d9a306e83756308568451ad0b54a4116e.tar.bz2
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Instruction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp
index 170a15f..3fabfd0 100644
--- a/lib/VMCore/Instruction.cpp
+++ b/lib/VMCore/Instruction.cpp
@@ -399,6 +399,8 @@ bool Instruction::isSafeToSpeculativelyExecute() const {
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)))