[PATCH] D112961: [fir] Add fir.extract_value and fir.insert_value conversion

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 03:09:14 PDT 2021


clementval marked an inline comment as done.
clementval added inline comments.


================
Comment at: flang/lib/Optimizer/CodeGen/TypeConverter.h:196
+private:
+  static llvm::StringMap<mlir::Type> identStructCache;
 };
----------------
mehdi_amini wrote:
> That makes it a global mutable map, that seems unsafe to me in general.
> 
> Here it seems even worse: this is never re-initialized and so it creates coupling between the lifetime of a Context (and even a module) and the entire process. Am I missing something?
I believe we can get rid of this entirely since `LLVMStructType::getIdentified` is doing the caching here already. Probably an old artifact when it was not working as expected. 
Thanks for pointing this out. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112961/new/

https://reviews.llvm.org/D112961



More information about the llvm-commits mailing list