Add a comment.

llvm-svn: 92492
This commit is contained in:
Dan Gohman 2010-01-04 18:38:39 +00:00
parent 5b9019515a
commit fc76441623
1 changed files with 2 additions and 0 deletions

View File

@ -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)))