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/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index 951de47..95378ca 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -439,6 +439,8 @@
}
void GlobalContext::dumpStats(const IceString &Name, bool Final) {
+ if (!ALLOW_DUMP)
+ return;
if (Flags.DumpStats) {
if (Final) {
StatsCumulative.dump(Name, getStrDump());
@@ -450,6 +452,8 @@
}
void GlobalContext::dumpTimers(TimerStackIdT StackID, bool DumpCumulative) {
+ if (!ALLOW_DUMP)
+ return;
assert(Timers.size() > StackID);
Timers[StackID].dump(getStrDump(), DumpCumulative);
}