[PATCH] D26832: [LTO] Add option to generate optimization records

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 21:32:41 PST 2016


davide added subscribers: beanz, davide.
davide added inline comments.


================
Comment at: lib/LTO/LTOCodeGenerator.cpp:96-100
+static cl::opt<std::string>
+    RemarksFilename("pass-remarks-output",
+                    cl::desc("Output filename for pass remarks"),
+                    cl::value_desc("filename"));
+
----------------
Side note, I very much dislike adding other `cl::opt` in library code, but this is what we have now. If I recall correctly, @beanz has plans for moving away of them, but not sure how far away it is.
If you use the new `lib/LTO` interface maybe you will be able to get rid of it (but you should use `llvm-lto2` to test.


================
Comment at: lib/LTO/LTOCodeGenerator.cpp:521-523
+    DiagnosticOutputFile->keep();
+    // FIXME: LTOCodeGenerator dtor is not invoked on Darwin
+    DiagnosticOutputFile->os().flush();
----------------
have you already diagnosed why?


================
Comment at: lib/LTO/LTOCodeGenerator.cpp:570-571
 
+  finishOptimiationRemarks();
+
   return true;
----------------
nit, typo: Optimiation


https://reviews.llvm.org/D26832





More information about the llvm-commits mailing list