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: [PATCH][RFC] Reduce the number of fields in field-sensitive PTA


On Wed, Jul 2, 2008 at 6:56 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> This removes most of the sub-fields generated by field-sensitive PTA.
> It does so by globbing adjacent non-pointer fields into a single
> sub-variable.  This should get rid of a significant fraction of
> sub-fields (assuming that usually structs contain data, not pointers).
>
> This should not weaken the PTA analysis (remember that for the
> resulting points-to sets all sub-fields map back to their decl).
>
> The patch changes the dump of vars to decl.offset+size, so you now see
>
> CALLUSED = { f f.256+64 f.128+128 f.64+64 i q }
>
> in the dumps.
>
> Bootstrap & regtest on x86_64-unknown-linux-gnu running.
>
> Ok for trunk?  With this we should be able to reduce the default
> of max-fields-for-field-sensitive to something more sane, say 10.
>
> Thanks,
> Richard.
>
> 2008-07-02  Richard Guenther  <rguenther@suse.de>
>
>        * tree-ssa-structalias.c (struct variable_info): Remove has_union.
>        (new_var_info): Deal with it.
>        (solution_set_add): Likewise.
>        (bitpos_of_field): Make signed, fix.
>        (struct fieldoff): Remove type and decl fields.  Make size field
>        unsigned HOST_WIDE_INT.  Add has_unknown_size and may_have_pointers
>        flags.
>        (fieldoff_compare): Deal with it.
>        (push_fields_onto_fieldstack): Remove has_union argument, glob
>        adjacent non-pointer fields together.
>        (create_function_info_for): Do not set has_union.
>        (create_variable_info_for): Simplify.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39202


-- 
H.J.


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