[llvm-commits] [llvm] r52930 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
clattner at apple.com
Mon Jun 30 17:55:07 PDT 2008
On Jun 30, 2008, at 3:10 PM, Evan Cheng wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=52930&view=rev
> Log:
> Add timing report for various sub-passes under SelectionDAGISel.
Nifty.
> void SelectionDAGISel::CodeGenAndEmitDAG(SelectionDAG &DAG) {
> + NamedRegionTimer *RegionTimer = 0;
> +
> DOUT << "Lowered selection DAG:\n";
> DEBUG(DAG.dump());
>
> // Run the DAG combiner in pre-legalize mode.
> + if (TimePassesIsEnabled)
> + RegionTimer = new NamedRegionTimer("DAG Combining 1");
> DAG.Combine(false, *AA);
> + if (TimePassesIsEnabled)
> + delete RegionTimer;
How about:
if (TimePassesIsEnabled) {
NamedRegionTimer T("DAG Combining 1");
DAG.Combine(false, *AA);
} else {
DAG.Combine(false, *AA);
}
?
-Chris
More information about the llvm-commits
mailing list