[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp TopDownClosure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Mar 23 20:22:21 PST 2005
Changes in directory llvm/lib/Analysis/DataStructure:
BottomUpClosure.cpp updated: 1.107 -> 1.108
TopDownClosure.cpp updated: 1.84 -> 1.85
---
Log message:
Fix a crash while promoting a value out of a loop from a global variable
when using ds-aa
---
Diffs of the changes: (+20 -2)
BottomUpClosure.cpp | 11 ++++++++++-
TopDownClosure.cpp | 11 ++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.107 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.108
--- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.107 Wed Mar 23 15:59:34 2005
+++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Wed Mar 23 22:22:04 2005
@@ -527,5 +527,14 @@
return;
}
- assert(!isa<GlobalVariable>(From) && "Do not know how to copy GV's yet!");
+ if (const Function *F = getFnForValue(To)) {
+ DSGraph &G = getDSGraph(*F);
+ G.getScalarMap().copyScalarIfExists(From, To);
+ return;
+ }
+
+ std::cerr << *From;
+ std::cerr << *To;
+ assert(0 && "Do not know how to copy this yet!");
+ abort();
}
Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.84 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.85
--- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.84 Mon Mar 21 19:50:42 2005
+++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Wed Mar 23 22:22:04 2005
@@ -468,5 +468,14 @@
return;
}
- assert(!isa<GlobalVariable>(From) && "Do not know how to copy GV's yet!");
+ if (const Function *F = getFnForValue(To)) {
+ DSGraph &G = getDSGraph(*F);
+ G.getScalarMap().copyScalarIfExists(From, To);
+ return;
+ }
+
+ std::cerr << *From;
+ std::cerr << *To;
+ assert(0 && "Do not know how to copy this yet!");
+ abort();
}
More information about the llvm-commits
mailing list