]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
compiledump: allow disabling of early graphs for large compiles
authorAlex Coyte <a.coyte@intel.com>
Wed, 29 Jun 2016 23:57:18 +0000 (09:57 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 10 Aug 2016 05:00:44 +0000 (15:00 +1000)
src/rose/rose_build_dump.cpp
src/rose/rose_in_dump.cpp

index 5e176c30c1217b30042e8ef11cd32f1b5061b1b4..a33e653a15d3e88a1f750a8079def1f5b555cc1d 100644 (file)
@@ -273,14 +273,18 @@ void dumpRoseGraph(const RoseBuild &build_base, const RoseEngine *t,
     const RoseBuildImpl &build = dynamic_cast<const RoseBuildImpl &>(build_base);
 
     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;
     }
 
     stringstream ss;
     ss << grey.dumpPath << filename;
 
-
     DEBUG_PRINTF("dumping graph to %s\n", ss.str().c_str());
     ofstream os(ss.str());
 
index 899e50c448d59715703ab651c7b372728eb440de..97aefdc40b155a7c5a1e427f0a5fd52234d58298 100644 (file)
@@ -51,7 +51,7 @@ namespace ue2 {
 
 void dumpPreRoseGraph(const RoseInGraph &ig, const Grey &grey,
                       const char *filename) {
-    if (!grey.dumpFlags) {
+    if (!(grey.dumpFlags & Grey::DUMP_INT_GRAPH)) {
         return;
     }