This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [trunk][patch] don't use SAVE_EXPR on TYPE_SIZE


On Tue, Jun 10, 2008 at 5:29 PM, Rafael Espindola <espindola@google.com> wrote:
>> Well, the SAVE_EXPR is to make sure side-effects in TYPE_SIZE{_UNIT}
>> are only executed once.  Why is the SAVE_EXPR a problem for LTO?
>
> We don't really need a SAVE_EXPR in the IL. It can be expanded into
> two statements. We can add support for it, but it would be better to
> expand it before getting into the streamer.
>
> Another option is doing just that on build_new. I could create a temp
> variable with the size and put that on the type.

Note that after gimplification (LTO streaming is after that, right?) the
TYPE_SIZE{_UNIT}s that are still used/needed are gimplified into the
IL (and a gimple temporary is stored in the TYPE_SIZE{_UNIT}s place)
and the SAVE_EXPRs are removed.  So if after gimplification
!is_gimple_val trees in TYPE_SIZE{_UNIT} remain they are "unused".
Of course not (de-)serializing them at all might still break stuff.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]