[clang] [llvm] [CIR] Add TBAA support for scalar loads and stores (PR #246079)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 06:52:24 PST 2026


================
@@ -2784,6 +2784,63 @@ mlir::LogicalResult CIRToLLVMAMDGPUFeaturePredicateOpLowering::matchAndRewrite(
   return mlir::success();
 }
 
+/// Lowers a CIR TBAA type descriptor to the LLVM dialect.
+static mlir::LLVM::TBAATypeDescriptorAttr
+lowerTBAATypeDescriptor(mlir::Attribute typeDesc,
----------------
xlauko wrote:

This rebuilds the descriptor tree for every load/store with no cache. A struct nested 22 levels deep takes 5.5 s to lower, against 0.04 s for classic. Could you memoize it per module?

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


More information about the cfe-commits mailing list