[llvm-commits] [llvm] r42132 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Duncan Sands
baldrick at free.fr
Wed Sep 19 03:25:40 PDT 2007
Author: baldrick
Date: Wed Sep 19 05:25:38 2007
New Revision: 42132
URL: http://llvm.org/viewvc/llvm-project?rev=42132&view=rev
Log:
Improve comment.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=42132&r1=42131&r2=42132&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Wed Sep 19 05:25:38 2007
@@ -8939,8 +8939,9 @@
// 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
More information about the llvm-commits
mailing list