[clang] [llvm] [SROA] Canonicalize homogeneous structs into fixed vectors (PR #165159)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 11 10:25:12 PDT 2026
yxsamliu wrote:
> > > > I'll look at the changes tomorrow, at first glance it looks good though. Could you confirm this is the latest benchmark run? [dtcxzyw/llvm-opt-benchmark#3520](https://github.com/dtcxzyw/llvm-opt-benchmark/pull/3520). Looks like really good improvements!
> > >
> > >
> > > That one is pretty close but I made some minor changes after that but forgot to trigger a new run. I just triggered a new run and let's see how it goes: [dtcxzyw/llvm-opt-benchmark#3547](https://github.com/dtcxzyw/llvm-opt-benchmark/pull/3547)
> >
> >
> > Hmm unfortunately looks like there's one regression that doesn't look good. We're vectorizing when the alloca gets promoted as a scalar anyway, but then this requires a bunch of inserts and extracts.
> > Sorry to be such a stickler, again I haven't reviewed much so IDK exactly what LLVM policy is, but I assume there should be a pretty high bar for transforms like SROA because it's such an important pass.
>
> I am OK. I think we should try fixing any regressions caused by changes in llvm passes since that could be a tip of an iceberg. I will look into this. Thanks.
got a fix for that regression and triggered a new run https://github.com/dtcxzyw/llvm-opt-benchmark/pull/3556
the regression happens when all uses of the partition are by components therefore no benefit of promoting to vector type. just added detection for that case and excluded it
https://github.com/llvm/llvm-project/pull/165159
More information about the cfe-commits
mailing list