tra added a comment.

I'm curious why we need the cache at all. While the construction of sanitizer 
args is hairy, it's only called few times from the driver and will be lost in 
the noise compared to everything else.



================
Comment at: clang/include/clang/Driver/ToolChain.h:165
 
-  mutable std::unique_ptr<SanitizerArgs> SanitizerArguments;
+  mutable std::map<const llvm::opt::ArgList *, std::unique_ptr<SanitizerArgs>>
+      SanArgs;
----------------
Using argument list as a proxy for a job is somewhat questionable. ArgList may 
not necessarily be related to a particular job at all.

Can we use JobAction as the key instead and default to full reconstruction of 
sanitizer args where it's not available? Or just always construct them without 
caching?


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

https://reviews.llvm.org/D111443

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to