Add a pass to convert aggregate loads/stores into scalar load stores

deadal nix deadalnix at
Fri Oct 10 20:45:02 PDT 2014

Hi all, I'd really like to have feedback on that one.

2014-10-05 20:09 GMT-07:00 deadal nix <deadalnix at>:

> As per title. Aggregate load and stores (granted they aren't unordered)
> are decomposed in a suite of scalar loads and stores and bit manipulation
> are used to reconstruct/deconstruct the aggregate using
> insertvalue/extractvalue.
> I wasn't sure where to add the pass so I added it fairly early. It may not
> be the idea place, I'll let you expert tell me. It seems need that this run
> before SROA and any pass that manipulate memory as this would defeat the
> point entirely.
> It do not need to run more than once as, as far as I know, no pass
> introduce aggregate load/store ever. So once the ones generated by the
> frontend are gone, the job is finished.
> This pass does nothing on non aggregate load/store (except going thourgh
> the instruction to check they are none), so I don't expect this to impact
> frontend that don't use them in any major way.
> I think this is a major step forward for LLVM usability from a front
> perspective.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the llvm-commits mailing list