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

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 21:43:14 PST 2016


anemet marked an inline comment as done.
anemet 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"));
+
----------------
davide wrote:
> 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.
Does the Darwin linker support the new interface?


================
Comment at: lib/LTO/LTOCodeGenerator.cpp:521-523
+    DiagnosticOutputFile->keep();
+    // FIXME: LTOCodeGenerator dtor is not invoked on Darwin
+    DiagnosticOutputFile->os().flush();
----------------
davide wrote:
> have you already diagnosed why?
I *think* that's a known bug in our linker.  Mehdi can correct me if I am wrong.


https://reviews.llvm.org/D26832





More information about the llvm-commits mailing list