[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Nick Lewycky
nicholas at mxc.ca
Wed Jun 6 04:26:42 PDT 2007
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.117 -> 1.118
---
Log message:
Optimize this test. Firstly, only Instructions may use other Instructions.
Secondly, checking whether removal succeeded tells you whether it was in
the map to begin with.
---
Diffs of the changes: (+2 -2)
ScalarEvolution.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.117 llvm/lib/Analysis/ScalarEvolution.cpp:1.118
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.117 Tue Jun 5 23:12:20 2007
+++ llvm/lib/Analysis/ScalarEvolution.cpp Wed Jun 6 06:26:20 2007
@@ -1210,8 +1210,8 @@
for (Instruction::use_iterator UI = II->use_begin(), UE = II->use_end();
UI != UE; ++UI) {
- Instruction *Inst = dyn_cast<Instruction>(*UI);
- if (Inst && hasSCEV(Inst) && Scalars.erase(Inst)) {
+ Instruction *Inst = cast<Instruction>(*UI);
+ if (Scalars.erase(Inst)) {
if (PHINode *PN = dyn_cast<PHINode>(II))
ConstantEvolutionLoopExitValue.erase(PN);
Worklist.push_back(Inst);
More information about the llvm-commits
mailing list