[llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp
Owen Anderson
resistor at mac.com
Thu Jun 7 18:53:07 PDT 2007
Changes in directory llvm/lib/Transforms/Scalar:
GVNPRE.cpp updated: 1.23 -> 1.24
---
Log message:
Small bugfix, and const-ify some methods (Thanks, Bill).
---
Diffs of the changes: (+6 -6)
GVNPRE.cpp | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp
diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.23 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.24
--- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.23 Thu Jun 7 20:03:01 2007
+++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Thu Jun 7 20:52:45 2007
@@ -77,8 +77,8 @@
// Helper fuctions
// FIXME: eliminate or document these better
- void dump(std::set<Value*>& s);
- void dump_unique(std::set<Value*, ExprLT>& s);
+ void dump(const std::set<Value*>& s) const;
+ void dump_unique(const std::set<Value*, ExprLT>& s) const;
void clean(std::set<Value*, ExprLT>& set);
bool add(Value* V, uint32_t number);
Value* find_leader(std::set<Value*, ExprLT>& vals,
@@ -269,7 +269,7 @@
}
-void GVNPRE::dump(std::set<Value*>& s) {
+void GVNPRE::dump(const std::set<Value*>& s) const {
DOUT << "{ ";
for (std::set<Value*>::iterator I = s.begin(), E = s.end();
I != E; ++I) {
@@ -278,7 +278,7 @@
DOUT << "}\n\n";
}
-void GVNPRE::dump_unique(std::set<Value*, ExprLT>& s) {
+void GVNPRE::dump_unique(const std::set<Value*, ExprLT>& s) const {
DOUT << "{ ";
for (std::set<Value*>::iterator I = s.begin(), E = s.end();
I != E; ++I) {
@@ -512,8 +512,8 @@
std::set<Value*, ExprLT>::iterator val = availOut.find(*I);
if (val != availOut.end())
- new_set.erase(val);
- new_set.insert(*I);
+ availOut.erase(val);
+ availOut.insert(*I);
}
}
More information about the llvm-commits
mailing list