On 8 June 2016 at 20:38, Jan Hubicka wrote: >> I think it would be nice to work towards transitioning >> flag_section_anchors to a flag on varpool nodes, thereby removing >> the Optimization flag from common.opt:fsection-anchors >> >> That would simplify the walk over varpool candidates. > > Makes sense to me, too. There are more candidates for sutff that should be > variable specific in common.opt (such as variable alignment, -fdata-sctions, > -fmerge-constants) and targets. We may try to do it in an easy to extend way > so incrementally we can get rid of those global flags, too. In this version I removed Optimization from fsection-anchors entry in common.opt, and gated the increase_alignment pass on flag_section_anchors != 0. Cross tested on arm*-*-*, aarch64*-*-*. Does it look OK ? > > One thing that needs to be done for LTO is sane merging, I guess in this case > it is clear that the variable should be anchored when its previaling definition > is. Um could we determine during WPA if symbol is a section anchor for merging ? Seems to me SYMBOL_REF_ANCHOR_P is defined only on DECL_RTL and not at tree level. Do we have DECL_RTL info available during WPA ? Thanks, Prathamesh > > Honza >> >> Richard. >> >> > Thanks, >> > Prathamesh >> > > >> > > Honza >> > >> >> > >> Richard. >> > >> > >> >> -- >> Richard Biener >> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)