[PATCH] D108850: [LLD] Remove global state in lldCommon
    Reid Kleckner via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 14 14:54:44 PDT 2021
    
    
  
rnk added subscribers: rriddle, mehdi_amini.
rnk added a comment.
I think this should be staged into two patches:
1. LLD-only: includes all of the Context changes, `saver()`, etc, but the context is still kept in a global pointer.
2. LTO.h and Parallel.h: make the context pointer thread local, allowing the possibility of two linker instances in the same process, and add the task wrapper API
The goal is to make the patch that changes Support as small as possible. MLIR uses the parallel APIs, so we should ask them (@mehdi_amini, @rriddle, maybe others) to review the changes to llvm/Support/Parallel.h.
================
Comment at: lld/tools/lld/lld.cpp:182
+
+  bool r; // The driver will be returning false if an error occurs.
+
----------------
This probably needs to be initialized or static analysis tools may complain, even though the invalid case is handled above.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108850/new/
https://reviews.llvm.org/D108850
    
    
More information about the llvm-commits
mailing list