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

Richard Guenther richard.guenther@gmail.com
Tue Jun 10 15:44:00 GMT 2008


On Tue, Jun 10, 2008 at 5:41 PM, Rafael Espindola <espindola@google.com> wrote:
>> 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.
>
> It is after gimplification, yes. Interesting, so the gimplifier does
> change some types. If it is unused, we should probably clear the
> field. I will try to find where it should be done in the gimplifier.

In general constant TYPE_SIZE{_UNIT} may be used, non-constant
generally not.  But you can only depend on that if you never call back
into the frontend ... (thus, to safely clear them after gimplification you
need all function bodies gimplified and possibly have debug information
emitted for VLAs).

Richard.



More information about the Gcc-patches mailing list