1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Add a comment.

llvm-svn: 92492
This commit is contained in:
Dan Gohman 2010-01-04 18:38:39 +00:00
parent c6beea09c5
commit 4a8e4ee52a

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