[PATCH] R600: Don't viewCFG() under DEBUG() except on failure.
Tom Stellard
tom at stellard.net
Mon Mar 24 13:22:29 PDT 2014
On Mon, Mar 24, 2014 at 01:19:34PM -0700, Matt Arsenault wrote:
> Having these popping up every time you use -debug is really irritating.
>
LGTM.
> http://llvm-reviews.chandlerc.com/D3162
>
> Files:
> lib/Target/R600/AMDILCFGStructurizer.cpp
>
> Index: lib/Target/R600/AMDILCFGStructurizer.cpp
> ===================================================================
> --- lib/Target/R600/AMDILCFGStructurizer.cpp
> +++ lib/Target/R600/AMDILCFGStructurizer.cpp
> @@ -790,7 +790,7 @@
> bool AMDGPUCFGStructurizer::run() {
>
> //Assume reducible CFG...
> - DEBUG(dbgs() << "AMDGPUCFGStructurizer::run\n";FuncRep->viewCFG(););
> + DEBUG(dbgs() << "AMDGPUCFGStructurizer::run\n");
>
> #ifdef STRESSTEST
> //Use the worse block ordering to test the algorithm.
> @@ -862,8 +862,7 @@
> ContNextScc = false;
> DEBUG(
> dbgs() << "repeat processing SCC" << getSCCNum(MBB)
> - << "sccNumIter = " << SccNumIter << "\n";
> - FuncRep->viewCFG();
> + << "sccNumIter = " << SccNumIter << '\n';
> );
> } else {
> // Finish the current scc.
> @@ -919,12 +918,10 @@
> BlockInfoMap.clear();
> LLInfoMap.clear();
>
> - DEBUG(
> - FuncRep->viewCFG();
> - );
> -
> - if (!Finish)
> - llvm_unreachable("IRREDUCIBL_CF");
> + if (!Finish) {
> + DEBUG(FuncRep->viewCFG());
> + llvm_unreachable("IRREDUCIBLE_CFG");
> + }
>
> return true;
> }
> Index: lib/Target/R600/AMDILCFGStructurizer.cpp
> ===================================================================
> --- lib/Target/R600/AMDILCFGStructurizer.cpp
> +++ lib/Target/R600/AMDILCFGStructurizer.cpp
> @@ -790,7 +790,7 @@
> bool AMDGPUCFGStructurizer::run() {
>
> //Assume reducible CFG...
> - DEBUG(dbgs() << "AMDGPUCFGStructurizer::run\n";FuncRep->viewCFG(););
> + DEBUG(dbgs() << "AMDGPUCFGStructurizer::run\n");
>
> #ifdef STRESSTEST
> //Use the worse block ordering to test the algorithm.
> @@ -862,8 +862,7 @@
> ContNextScc = false;
> DEBUG(
> dbgs() << "repeat processing SCC" << getSCCNum(MBB)
> - << "sccNumIter = " << SccNumIter << "\n";
> - FuncRep->viewCFG();
> + << "sccNumIter = " << SccNumIter << '\n';
> );
> } else {
> // Finish the current scc.
> @@ -919,12 +918,10 @@
> BlockInfoMap.clear();
> LLInfoMap.clear();
>
> - DEBUG(
> - FuncRep->viewCFG();
> - );
> -
> - if (!Finish)
> - llvm_unreachable("IRREDUCIBL_CF");
> + if (!Finish) {
> + DEBUG(FuncRep->viewCFG());
> + llvm_unreachable("IRREDUCIBLE_CFG");
> + }
>
> return true;
> }
> _______________________________________________
> 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