[PATCH] D13379: Add an utility to lift aggregate loads in SROA.

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 21:05:45 PDT 2015


deadalnix added a comment.

I think doing this as part of SROA makes the more sense. Doing the transformation without SROA make things worse is many cases, on the other hand, running this as part of SROA give nice results even when no other pass runs. Clearly this can be seen as preparing the field so SROA can do more.

As for the memcpy temporary, it is necessary to not loose the information about the whole aggregate when there is padding. If you loose this information at one step, subsequents passes suddenly try to work hard to keep the padding intact, which result in suboptimal results, so simply "exploding" the memory access like SRAO does not cut it.


http://reviews.llvm.org/D13379





More information about the llvm-commits mailing list