Subzero: Add a few performance measurement tools.
--timing-funcs - Produces a sorted list of total time spent translating each function.
--timing-focus=<F> - Turns on the --timing equivalent just for one function. Use '*' to do this for all functions, i.e. get complete timing breakdowns across all functions.
--verbose-focus=<F> - Temporarily turns on --verbose=all for one function.
BUG= none
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/620373004
diff --git a/src/IceTimerTree.def b/src/IceTimerTree.def
new file mode 100644
index 0000000..5319b1d
--- /dev/null
+++ b/src/IceTimerTree.def
@@ -0,0 +1,49 @@
+//===- subzero/src/IceTimerTree.def - X-macros for timing -------*- C++ -*-===//
+//
+// The Subzero Code Generator
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file lists predefined timing tags. New tags can be added to
+// avoid a runtime string lookup.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef SUBZERO_SRC_ICETIMERTREE_DEF
+
+#define TIMERTREE_TABLE \
+ /* enum value */ \
+ X(O2) \
+ X(Om1) \
+ X(convertToIce) \
+ X(deletePhis) \
+ X(doAddressOpt) \
+ X(doArgLowering) \
+ X(doBranchOpt) \
+ X(doNopInsertion) \
+ X(emit) \
+ X(genCode) \
+ X(genFrame) \
+ X(initUnhandled) \
+ X(linearScan) \
+ X(liveRange) \
+ X(liveness) \
+ X(livenessLightweight) \
+ X(llvmConvert) \
+ X(parse) \
+ X(placePhiLoads) \
+ X(placePhiStores) \
+ X(postLower) \
+ X(regAlloc) \
+ X(renumberInstructions) \
+ X(szmain) \
+ X(translate) \
+ X(validateLiveness) \
+ X(vmetadata)
+//#define X(tag)
+
+#define SUBZERO_SRC_ICETIMERTREE_DEF
+#endif // SUBZERO_SRC_ICETIMERTREE_DEF