[llvm] [SROA] Allow rewriting memcpy depending on tbaa.struct (PR #77597)

Bruno De Fraine via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 06:47:14 PDT 2024


brunodf-snps wrote:

> Hi @brunodf-snps. Did you try this patch to see if it helped out avoid regressions?
> 
> We have been using this solution downstream. So it is interesting to know if it has value to others as well.

I retrieved the application where we saw the most regression, and I retried it with an LLVM-18 based build. I use the number of allocas in the optimized LLVM IR as a measure. Applying/reverting commit 54067c5fbe has a dramatic effect: 169 versus 2369 allocas. Then I tried this patch, but unfortunately it does not have any effect, it stays at 2369 allocas. I did not investigate why (I probably need a much smaller test case for that). I know that we do use `-Xclang -new-struct-path-tbaa`, perhaps the TBAA metadata format is different.

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


More information about the llvm-commits mailing list