compiledump: allow disabling of early graphs for large compiles

This commit is contained in:
Alex Coyte 2016-06-30 09:57:18 +10:00 committed by Matthew Barr
parent 9eb349a343
commit b13a90e5d2
2 changed files with 7 additions and 3 deletions

View File

@ -273,14 +273,18 @@ void dumpRoseGraph(const RoseBuild &build_base, const RoseEngine *t,
const RoseBuildImpl &build = dynamic_cast<const RoseBuildImpl &>(build_base); const RoseBuildImpl &build = dynamic_cast<const RoseBuildImpl &>(build_base);
const Grey &grey = build.cc.grey; const Grey &grey = build.cc.grey;
if (!grey.dumpFlags) {
/* "early" rose graphs should only be dumped if we are dumping intermediate
* graphs. Early graphs can be identified by the lack of a RoseEngine. */
u32 flag_test = t ? Grey::DUMP_IMPL : Grey::DUMP_INT_GRAPH;
if (!(grey.dumpFlags & flag_test)) {
return; return;
} }
stringstream ss; stringstream ss;
ss << grey.dumpPath << filename; ss << grey.dumpPath << filename;
DEBUG_PRINTF("dumping graph to %s\n", ss.str().c_str()); DEBUG_PRINTF("dumping graph to %s\n", ss.str().c_str());
ofstream os(ss.str()); ofstream os(ss.str());

View File

@ -51,7 +51,7 @@ namespace ue2 {
void dumpPreRoseGraph(const RoseInGraph &ig, const Grey &grey, void dumpPreRoseGraph(const RoseInGraph &ig, const Grey &grey,
const char *filename) { const char *filename) {
if (!grey.dumpFlags) { if (!(grey.dumpFlags & Grey::DUMP_INT_GRAPH)) {
return; return;
} }