vitalybuka added inline comments.

================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:813
+    const StackSafetyGlobalInfo *SSI = nullptr;
+    if (ClUseStackSafety) {
+      SSI = &getAnalysis<StackSafetyGlobalInfoWrapperPass>().getResult();
----------------
usually we don't use {} for one liners.
But I'd prefer here:
const StackSafetyGlobalInfo *SSI = ClUseStackSafety ? get...: nullptr


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1343
 INITIALIZE_PASS_DEPENDENCY(ASanGlobalsMetadataWrapperPass)
 INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
 INITIALIZE_PASS_END(
----------------
INITIALIZE_PASS_DEPENDENCY(StackSafetyGlobalInfoWrapperPass)


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1265
 GlobalsMetadata ASanGlobalsMetadataAnalysis::run(Module &M,
                                                  ModuleAnalysisManager &AM) {
   return GlobalsMetadata(M);
----------------
vitalybuka wrote:
> You can make this module pass to calculate StackSafetyGlobalAnalysis and use 
> cached one below.
> This way we will avoid exposure of this logic to PM
It should probably be in ModuleAddressSanitizerPass, so it wll return ::all() 
and we don't care about invalidation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112098

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

Reply via email to