[PATCH] D12308: gold-plugin: Implement parallel LTO code generation using llvm::LinkedCodeGen.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 08:42:37 PDT 2015
joker.eph added a subscriber: joker.eph.
joker.eph added a comment.
Few comment (I never used gold)
================
Comment at: tools/gold/gold-plugin.cpp:134
@@ -131,1 +133,3 @@
OptLevel = opt[1] - '0';
+ } else if (opt.startswith("jobs=")) {
+ Parallelism = atoi(opt_ + 5);
----------------
any reason not re-using the same `-j` that is used by most tool for the jobs?
(Maybe it is more coherent with gold, I don't know).
================
Comment at: tools/gold/gold-plugin.cpp:135
@@ -132,1 +134,3 @@
+ } else if (opt.startswith("jobs=")) {
+ Parallelism = atoi(opt_ + 5);
} else {
----------------
strtol?
================
Comment at: tools/gold/gold-plugin.cpp:786
@@ -781,3 +785,3 @@
- runLTOPasses(M, *TM);
+ runLTOPasses(*M.get(), *TM);
----------------
Is the `.get()` useful here?
================
Comment at: tools/gold/gold-plugin.cpp:789
@@ -784,5 +788,3 @@
if (options::TheOutputType == options::OT_SAVE_TEMPS)
- saveBCFile(output_name + ".opt.bc", M);
-
- legacy::PassManager CodeGenPasses;
+ saveBCFile(output_name + ".opt.bc", *M.get());
----------------
same
================
Comment at: tools/gold/gold-plugin.cpp:803
@@ +802,3 @@
+ std::list<llvm::raw_fd_ostream> OSs;
+ std::vector<llvm::raw_pwrite_stream *> OSPtrs(options::Parallelism);
+ for (unsigned I = 0; I != options::Parallelism; ++I) {
----------------
Same question as for llvm-lto, what about tool_output_file?
http://reviews.llvm.org/D12308
More information about the llvm-commits
mailing list