[PATCH] Reassociate GEP operands for loop invariant code motion
meheff at google.com
Mon Apr 20 18:26:25 PDT 2015
Hi jingyue, hfinkel,
Rename SeparateConstOffsetFromGEP pass to ReassociateGEPs and
expand to include reassociation of loop invariant terms in the
indices of GEPs. This reassociation enables splitting GEPs into
two separate GEPS: one loop invariant and the other loop variant
GEPs. The existing reassociation pass is unable to perform this
transformation because that pass does not reassociate values
across GEP operands.
The renamed pass now performs three related GEP transformations:
1) Reassociate and gather constant offsets in GEP sequential index operands.
2) Reassociate loop invariant terms in GEP sequential index operands.
3) (Optional) Lower GEPs into simpler GEPs or their arithmetic equivalents.
This patch adds (2) and includes significant refactoring to share
code between the constant offset reassociation and the loop
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 149926 bytes
Desc: not available
More information about the llvm-commits