Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: src/IceCfgNode.cpp

Issue 686913005: Turn off dump/emit routines when building minimal subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits and format. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceGlobalContext.h » ('j') | src/IceTypes.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.cpp
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp
index 07246a2c6291b208cb66ead12db26f1bee7bfa11..36ea1cfce9dc712813e8cdce9377efac5c55555a 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -811,6 +811,8 @@ namespace {
void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
bool IsLiveIn, std::vector<SizeT> &LiveRegCount) {
+ if (!ALLOW_DUMP)
+ return;
Liveness *Liveness = Func->getLiveness();
const LivenessBV *Live;
if (IsLiveIn) {
@@ -841,6 +843,8 @@ void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
void emitLiveRangesEnded(Ostream &Str, const Cfg *Func, const Inst *Instr,
std::vector<SizeT> &LiveRegCount) {
+ if (!ALLOW_DUMP)
+ return;
bool First = true;
Variable *Dest = Instr->getDest();
if (Dest && Dest->hasReg())
@@ -886,6 +890,8 @@ void updateStats(Cfg *Func, const Inst *I) {
} // end of anonymous namespace
void CfgNode::emit(Cfg *Func) const {
+ if (!ALLOW_DUMP)
+ return;
Func->setCurrentNode(this);
Ostream &Str = Func->getContext()->getStrEmit();
Liveness *Liveness = Func->getLiveness();
@@ -943,6 +949,8 @@ void CfgNode::emitIAS(Cfg *Func) const {
}
void CfgNode::dump(Cfg *Func) const {
+ if (!ALLOW_DUMP)
+ return;
Func->setCurrentNode(this);
Ostream &Str = Func->getContext()->getStrDump();
Liveness *Liveness = Func->getLiveness();
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceGlobalContext.h » ('j') | src/IceTypes.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698