[llvm-commits] [llvm] r92046 - /llvm/trunk/lib/Analysis/PHITransAddr.cpp
Chris Lattner
clattner at apple.com
Wed Dec 23 14:27:18 PST 2009
On Dec 23, 2009, at 1:06 PM, David Greene wrote:
> Author: greened
> Date: Wed Dec 23 15:06:14 2009
> New Revision: 92046
>
> URL: http://llvm.org/viewvc/llvm-project?rev=92046&view=rev
> Log:
>
> Convert debug messages to use dbgs(). Generally this means
> s/errs/dbgs/g except for certain special cases.
The change to dump() is fine, the others are not.
-Chris
>
> Modified:
> llvm/trunk/lib/Analysis/PHITransAddr.cpp
>
> Modified: llvm/trunk/lib/Analysis/PHITransAddr.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PHITransAddr.cpp?rev=92046&r1=92045&r2=92046&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Analysis/PHITransAddr.cpp (original)
> +++ llvm/trunk/lib/Analysis/PHITransAddr.cpp Wed Dec 23 15:06:14 2009
> @@ -14,6 +14,7 @@
> #include "llvm/Analysis/PHITransAddr.h"
> #include "llvm/Analysis/Dominators.h"
> #include "llvm/Analysis/InstructionSimplify.h"
> +#include "llvm/Support/Debug.h"
> #include "llvm/Support/raw_ostream.h"
> using namespace llvm;
>
> @@ -35,12 +36,12 @@
>
> void PHITransAddr::dump() const {
> if (Addr == 0) {
> - errs() << "PHITransAddr: null\n";
> + dbgs() << "PHITransAddr: null\n";
> return;
> }
> - errs() << "PHITransAddr: " << *Addr << "\n";
> + dbgs() << "PHITransAddr: " << *Addr << "\n";
> for (unsigned i = 0, e = InstInputs.size(); i != e; ++i)
> - errs() << " Input #" << i << " is " << *InstInputs[i] << "\n";
> + dbgs() << " Input #" << i << " is " << *InstInputs[i] << "\n";
> }
>
>
> @@ -62,9 +63,9 @@
> // If it isn't in the InstInputs list it is a subexpr incorporated
> into the
> // address. Sanity check that it is phi translatable.
> if (!CanPHITrans(I)) {
> - errs() << "Non phi translatable instruction found in
> PHITransAddr, either "
> + dbgs() << "Non phi translatable instruction found in
> PHITransAddr, either "
> "something is missing from InstInputs or CanPHITrans
> is wrong:\n";
> - errs() << *I << '\n';
> + dbgs() << *I << '\n';
> return false;
> }
>
> @@ -88,9 +89,9 @@
> return false;
>
> if (!Tmp.empty()) {
> - errs() << "PHITransAddr inconsistent, contains extra
> instructions:\n";
> + dbgs() << "PHITransAddr inconsistent, contains extra
> instructions:\n";
> for (unsigned i = 0, e = InstInputs.size(); i != e; ++i)
> - errs() << " InstInput #" << i << " is " << *InstInputs[i] <<
> "\n";
> + dbgs() << " InstInput #" << i << " is " << *InstInputs[i] <<
> "\n";
> return false;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list