mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 03:58:16 +00:00
Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7801644332
commit
46318cdfd0
@ -8939,8 +8939,9 @@ static bool isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom) {
|
||||
// If it is an alloca it is always safe to load from.
|
||||
if (isa<AllocaInst>(V)) return true;
|
||||
|
||||
// Don't try to evaluate aliases. External weak GV can be null.
|
||||
// If it is a global variable it is mostly safe to load from.
|
||||
if (const GlobalValue *GV = dyn_cast<GlobalVariable>(V))
|
||||
// Don't try to evaluate aliases. External weak GV can be null.
|
||||
return !isa<GlobalAlias>(GV) && !GV->hasExternalWeakLinkage();
|
||||
|
||||
// Otherwise, be a little bit agressive by scanning the local block where we
|
||||
|
Loading…
Reference in New Issue
Block a user