diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-13 19:55:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-13 19:55:22 +0000 |
commit | d36c91c9c6f87d28230c3ae0e4381473eac7944a (patch) | |
tree | 4406e1486b2bc5aaeab01eb8c1868a02444266f7 | |
parent | 966644628de104ac4974c209f02ede57f8a107a5 (diff) |
Updates to work with new cfg namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/DCE.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 720354a4df..29e3ba1a71 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -15,7 +15,10 @@ // that this may cause other earlier values to become unused. To make sure that // we get them all, we iterate until things stop changing. Instead, when // removing a value, recheck all of its operands to see if they are now unused. -// Piece of cake, and more efficient as well. +// Piece of cake, and more efficient as well. +// +// Note, this is not trivial, because we have to worry about invalidating +// iterators. :( // //===----------------------------------------------------------------------===// @@ -28,6 +31,8 @@ #include "llvm/Assembly/Writer.h" #include "llvm/CFG.h" +using namespace cfg; + struct ConstPoolDCE { enum { EndOffs = 0 }; static bool isDCEable(const Value *) { return true; } @@ -302,6 +307,8 @@ static bool DoDCEPass(Method *M) { // You ARE the weakest link... goodbye delete BB; + + WriteToVCG(M, "MergedInto"); } } } |