[PATCH] dbgs() Use

Here's an example patch of how dbgs() will be used. Essentially I will
replace uses of errs() with dbgs(). I believe this is the correct thing
to do because:

- With #define NDEBUG, dbgs() == errs()

- With debugging and -debug-buffer-size=0 (the default), dbgs() just
  passes output to errs().

- When -debug-buffer-size>0, you want to buffer ALL output so that you
  don't get some strange reordering effect where some output goes out
  early and the rest gets dumped at the end.

Please review and let me know if the general approach is ok. I will
start to convert files once I get the ok.

Thanks!

                             -Dave

Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Here's an example patch of how dbgs() will be used. Essentially I will
replace uses of errs() with dbgs(). I believe this is the correct thing
to do because:

- With #define NDEBUG, dbgs() == errs()

- With debugging and -debug-buffer-size=0 (the default), dbgs() just
passes output to errs().

- When -debug-buffer-size>0, you want to buffer ALL output so that you
don't get some strange reordering effect where some output goes out
early and the rest gets dumped at the end.

Please review and let me know if the general approach is ok. I will
start to convert files once I get the ok.

Sounds good.

+++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp (working copy)
+++ lib/Target/X86/X86ISelDAGToDAG.cpp (working copy)

Looks fine to me, go ahead and convert stuff over when the dependencies go in. Please make sure not to change things that *really should* go errs(), such as stuff in top level tools that want to print errors.

-Chris

Got it.

                            -Dave