[PATCH] D20268: [wip] Resolution-based LTO API.

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 20:55:38 PDT 2016


mehdi_amini added inline comments.

================
Comment at: include/llvm/CodeGen/LTOBackend.h:67
@@ +66,3 @@
+  /// (ThinLTO) the module, before modifying it.
+  ModuleHookFn PreOptModuleHook;
+
----------------
pcc wrote:
> mehdi_amini wrote:
> > What is the Task "ID" at this point? This would be a task that will not codegen in the case of a parallel backend?
> > What is the Task "ID" at this point? 
> I'm not sure what you are asking here. The task ID generally stays consistent across the whole pipeline.
> 
> > This would be a task that will not codegen in the case of a parallel backend?
> Do you mean a distributed backend? In that case, none of the hooks will be called for ThinLTO tasks other than the combined module hook. I will document that.
I meant the LTO parallel codegen: after merging the IR you will call this hook with a tuple <task-ID, module> that will never go through the codegen.

================
Comment at: include/llvm/LTO/Resolution/LTOBackend.h:71
@@ +70,3 @@
+  /// data structures. A module hook will never be called from multiple threads
+  /// with the same task ID, or the same module.
+  ///
----------------
The thread safety in LLVM is at the LLVMContext level, not the module level.


http://reviews.llvm.org/D20268





More information about the llvm-commits mailing list