Begin multithreading the llvm backend when -use-separate-modules is enabled

This commit is contained in:
gingerBill
2023-01-05 12:29:16 +00:00
parent 1517f1d779
commit 213a0499a1
4 changed files with 53 additions and 19 deletions
+3
View File
@@ -132,6 +132,8 @@ struct lbModule {
PtrMap<void *, lbStructFieldRemapping> struct_field_remapping; // Key: LLVMTypeRef or Type *
i32 internal_type_level;
RecursiveMutex values_mutex;
PtrMap<Entity *, lbValue> values;
PtrMap<Entity *, lbAddr> soa_values;
StringMap<lbValue> members;
@@ -178,6 +180,7 @@ struct lbGenerator {
PtrMap<LLVMContextRef, lbModule *> modules_through_ctx;
lbModule default_module;
BlockingMutex anonymous_proc_lits_mutex;
PtrMap<Ast *, lbProcedure *> anonymous_proc_lits;
BlockingMutex foreign_mutex;