[llvm] r177374 - Tighten up an internal LSR API that should check for NULL.
Andrew Trick
atrick at apple.com
Mon Mar 18 21:14:57 PDT 2013
Author: atrick
Date: Mon Mar 18 23:14:57 2013
New Revision: 177374
URL: http://llvm.org/viewvc/llvm-project?rev=177374&view=rev
Log:
Tighten up an internal LSR API that should check for NULL.
No test case, but should fix a scan_build warning.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=177374&r1=177373&r2=177374&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Mar 18 23:14:57 2013
@@ -895,7 +895,7 @@ void Cost::RatePrimaryRegister(const SCE
}
if (Regs.insert(Reg)) {
RateRegister(Reg, Regs, L, SE, DT);
- if (isLoser())
+ if (LoserRegs && isLoser())
LoserRegs->insert(Reg);
}
}
More information about the llvm-commits
mailing list