Give NamedRegionTimer an Enabled flag, allowing all its clients to
authorDan Gohman <gohman@apple.com>
Fri, 18 Jun 2010 15:56:31 +0000 (15:56 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 18 Jun 2010 15:56:31 +0000 (15:56 +0000)
commit03c3dc7b6828d48a9f3be50896b3390a696caa64
treefd34a907e926493b458a8d905ab6048dcbc4ad95
parent27445f0375ae01652c08569c7843bddc95cedd61
Give NamedRegionTimer an Enabled flag, allowing all its clients to
switch from this:

  if (TimePassesIsEnabled) {
    NamedRegionTimer T(Name, GroupName);
    do_something();
  } else {
    do_something(); // duplicate the code, this time without a timer!
  }

to this:

  {
    NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled);
    do_something();
  }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106285 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Timer.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Support/Timer.cpp