projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89d6a24
)
Add a comment.
author
Dan Gohman
<gohman@apple.com>
Mon, 4 Jan 2010 18:38:39 +0000
(18:38 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 4 Jan 2010 18:38:39 +0000
(18:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92492
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Instruction.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Instruction.cpp
b/lib/VMCore/Instruction.cpp
index 170a15f216f4a9b1b74bda5fcb3c29351f9e616f..3fabfd07b316fe43f9e1b15e008e90cf9a34d71f 100644
(file)
--- 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)))