[PATCH] D15390: [ThinLTO] Launch importing backends in parallel threads from gold plugin
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 28 11:14:04 PST 2016
joker.eph added a comment.
I'm not familiar with Gold, but here are a few minor comments
================
Comment at: tools/gold/gold-plugin.cpp:102
@@ +101,3 @@
+ File = std::move(RHS.File);
+ }
+ PluginInputFile &operator=(PluginInputFile &&RHS) {
----------------
Any difference with ` PluginInputFile(PluginInputFile &&RHS) = default;` ?
================
Comment at: tools/gold/gold-plugin.cpp:107
@@ -88,3 +106,3 @@
+ return *this;
}
};
----------------
(same =default here)
================
Comment at: tools/gold/gold-plugin.cpp:826
@@ +825,3 @@
+ /// The target machine for generating code for this module.
+ std::unique_ptr<TargetMachine> TM;
+
----------------
Note: you could reuse the TargetMachine for the next module processed by this thread.
================
Comment at: tools/gold/gold-plugin.cpp:1104
@@ +1103,3 @@
+ if (L.move(*M, Keep, [](GlobalValue &, IRMover::ValueAdder) {}))
+ message(LDPL_FATAL, "Failed to rename module for ThinLTO");
+ if (renameModuleForThinLTO(*NewModule, &CombinedIndex))
----------------
There is a bunch of duplicated code above (used in regular LTO as well I think)
http://reviews.llvm.org/D15390
More information about the llvm-commits
mailing list