From 46318cdfd024ac3d1cb491eec7e280059ef502e3 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 19 Sep 2007 10:25:38 +0000 Subject: [PATCH] Improve comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42132 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 07eb2528c45..3a7d1018c40 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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(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(V)) + // Don't try to evaluate aliases. External weak GV can be null. return !isa(GV) && !GV->hasExternalWeakLinkage(); // Otherwise, be a little bit agressive by scanning the local block where we -- 2.34.1