Turn off dump/emit routines when building minimal subzero.

Remove the dump/emit routines when ALLOW_DUMP=0. Also fixes some
verbosity messages to not print if ALLOW_DUMP=0. Note: emit routines
needed for emitIAS are not turned off.

BUG=None
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/686913005
diff --git a/src/IceRegAlloc.cpp b/src/IceRegAlloc.cpp
index 569a616..2a30034 100644
--- a/src/IceRegAlloc.cpp
+++ b/src/IceRegAlloc.cpp
@@ -46,6 +46,8 @@
 
 void dumpDisableOverlap(const Cfg *Func, const Variable *Var,
                         const char *Reason) {
+  if (!ALLOW_DUMP)
+    return;
   if (Func->getContext()->isVerbose(IceV_LinearScan)) {
     VariablesMetadata *VMetadata = Func->getVMetadata();
     Ostream &Str = Func->getContext()->getStrDump();
@@ -62,6 +64,8 @@
 }
 
 void dumpLiveRange(const Variable *Var, const Cfg *Func) {
+  if (!ALLOW_DUMP)
+    return;
   Ostream &Str = Func->getContext()->getStrDump();
   const static size_t BufLen = 30;
   char buf[BufLen];
@@ -252,7 +256,8 @@
   TimerMarker T(TimerStack::TT_linearScan, Func);
   assert(RegMaskFull.any()); // Sanity check
   Ostream &Str = Func->getContext()->getStrDump();
-  bool Verbose = Func->getContext()->isVerbose(IceV_LinearScan);
+  const bool Verbose =
+      ALLOW_DUMP && Func->getContext()->isVerbose(IceV_LinearScan);
   Func->resetCurrentNode();
   VariablesMetadata *VMetadata = Func->getVMetadata();
 
@@ -691,6 +696,8 @@
 // ======================== Dump routines ======================== //
 
 void LinearScan::dump(Cfg *Func) const {
+  if (!ALLOW_DUMP)
+    return;
   Ostream &Str = Func->getContext()->getStrDump();
   if (!Func->getContext()->isVerbose(IceV_LinearScan))
     return;