[flang-commits] [flang] [flang] use TBAA Forest in TBAABuilder (PR #68437)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Mon Oct 9 03:36:02 PDT 2023


================
@@ -39,26 +49,10 @@ static llvm::cl::opt<unsigned>
 namespace fir {
 
 TBAABuilder::TBAABuilder(MLIRContext *context, bool applyTBAA)
-    : enableTBAA(applyTBAA && !disableTBAA) {
+    : enableTBAA(applyTBAA && !disableTBAA),
+      trees(/*separatePerFunction=*/perFunctionTBAATrees) {
----------------
tblah wrote:

Yes we will. Although, my intention is to enable my FIR pass whenever we are using TBAA so I don't anticipate TBAABuilder will often run without the FIR alias tags pass..

I am yet to see evidence of significant slowdowns due to using per-function TBAA trees. The FIR pass applies tags to every function which has dummy arguments, so I suspect keeping the global tree for unaffected functions which slow down due to per-function trees is a very uncommon case.

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


More information about the flang-commits mailing list