[llvm] [hwasan] Invalidate DominatorTreeAnalysis after each function is sanitized (PR #66935)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 13:20:11 PDT 2023


================
@@ -1542,8 +1557,13 @@ void HWAddressSanitizer::sanitizeFunction(Function &F,
     }
   }
 
+  DominatorTree &DT = FAM.getResult<DominatorTreeAnalysis>(F);
+  PostDominatorTree &PDT = FAM.getResult<PostDominatorTreeAnalysis>(F);
+  DomTreeUpdater DTU(DT, PDT, DomTreeUpdater::UpdateStrategy::Lazy);
+  LoopInfo &LI = FAM.getResult<LoopAnalysis>(F);
----------------
fmayer wrote:

We could pull the definitions for DT PDT and LI out of the if in 1538 then we need not repeat them.

https://github.com/llvm/llvm-project/pull/66935


More information about the llvm-commits mailing list