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

deadal nix deadalnix at gmail.com
Sun Oct 5 20:09:36 PDT 2014


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: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141005/616fa671/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-pass-to-transform-aggregate-loads-and-stores-i.patch
Type: text/x-patch
Size: 27445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141005/616fa671/attachment.bin>


More information about the llvm-commits mailing list