move increase_alignment from simple to regular ipa pass

Richard Biener rguenther@suse.de
Thu Jun 2 07:53:00 GMT 2016


On Thu, 2 Jun 2016, Prathamesh Kulkarni wrote:

> On 1 June 2016 at 18:37, Richard Biener <rguenther@suse.de> wrote:
> > On Wed, 1 Jun 2016, Prathamesh Kulkarni wrote:
> >
> >> Hi Richard,
> >> This patch tries to move increase_alignment pass from small to regular ipa pass.
> >> Does the patch look correct ?
> >> Since we are only increasing alignment of varpool nodes, I am not sure
> >> if any ipa
> >> read/write hooks were necessary and passed NULL for them.
> >> Cross-tested on arm*-*-*, aarch64*-*-*,
> >> Bootstrap+test on aarch64-linux-gnu in progress.
> >
> > I think the patch looks sensible apart from the fact that both
> > flag_section_anchors and flag_tree_vectorize can have different
> > states for each function.  This would mean the pass should get
> > its own non-Optimization flag initialized by targets where
> > section anchors are usually used and it means you'd want to
> > walk IPA refs to see whether variables are used in a function
> > with both section anchors and vectorization enabled.
> Hi,
> I have attached patch (stage-1 built) that walks ipa-refs to determine
> if function has flag_tree_loop_vectorize and flag_section_anchors set.
> Does it look OK ?
> 
> "This would mean the pass should get its own non-Optimization flag
> initialized by targets where section anchors are usually used"
> IIUC should we add a new option -fno-increase_alignment and gate the
> pass on it ? Um sorry I didn't understand why targets
> with section anchors (arm, aarch64, ppc) should initialize this option ?

Currently the pass is only run for targets with section anchors (and there
by default if they are enabled by default).  So it makes sense to
run on those by default and the pass is not necessary on targets w/o
section anchors as the vectorizer can easily adjust alignment itself on
those.

Richard.

> Thanks,
> Prathamesh
> >
> > Honza may have further comments.
> >
> > Thanks,
> > Richard.
> >
> >> Thanks,
> >> Prathamesh
> >>
> >
> > --
> > Richard Biener <rguenther@suse.de>
> > SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)



More information about the Gcc-patches mailing list