diff options
| author | Duncan Sands <baldrick@free.fr> | 2007-09-19 10:25:38 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2007-09-19 10:25:38 +0000 |
| commit | d31649bc59bc08c21f2062bbf05573e8611df7af (patch) | |
| tree | 23ad2431471ec24575dcc5b68bad1ddbc6c054b2 /llvm/lib/Transforms | |
| parent | a38e527523f1981f644cb53ba72fe38186401b9c (diff) | |
| download | bcm5719-llvm-d31649bc59bc08c21f2062bbf05573e8611df7af.tar.gz bcm5719-llvm-d31649bc59bc08c21f2062bbf05573e8611df7af.zip | |
Improve comment.
llvm-svn: 42132
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 07eb2528c45..3a7d1018c40 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -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 |

