This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Preliminary patch to fix some function specific option breakage
On Fri, Jul 25, 2008 at 09:57:52AM -0400, Michael Meissner wrote:
> On Fri, Jul 25, 2008 at 06:04:10AM -0700, H.J. Lu wrote:
> > On Fri, Jul 25, 2008 at 08:27:15AM -0400, Michael Meissner wrote:
> > > I've been iterating with H. J. Lu about the breakage on the IA-64, which was
> > > due to the cold attribute turning on options that that the backend had turned
> > > off in OVERRIDE_OPTIONS. This patch should fix the ia-64, and not enable
> > > scheduling on the x86.
> > >
> > > On the theory that there are other ports that have the same issue, this patch
> > > also disables cold/hot attributes on ports that define OVERRIDE_OPTIONS but not
> > > the new SECONDARY_OVERRIDE_OPTIONS until we can fix the ports. At this point,
> > > I just wrote the patch and did some preliminary checking on it, but I'm posting
> > > it now to get feedback from the other port maintainers to see if it allows
> > > their ports to bootstrap where previously it did not.
> >
> > SECONDARY_OVERRIDE_OPTIONS is only used to modify optimization
> > options. Can we use OVERRIDE_OPTIMIZATION_OPTIONS instead?
>
> Or just fold the changes into OPTIMIZATION_OPTIONS and change the
> documentation. That probably is a better approach than creating yet another
> target hook macro.
>
> However, I can see that I will need to go over all of the ports with
> OVERRIDE_OPTIONS and OPTIMIZATION_OPTIONS. Sigh...
>
> HJ, could you fire off a bootstrap build on the IA-64 with the patches (or some
> varient) to see whether it fixes the current issues you have?
I will do that.
>
> > > Index: gcc/config/i386/i386.h
> > > ===================================================================
> > > --- gcc/config/i386/i386.h (revision 138117)
> > > +++ gcc/config/i386/i386.h (working copy)
> > > @@ -476,6 +476,17 @@ enum calling_abi
> > >
> > > #define OVERRIDE_OPTIONS override_options (true)
> > >
> > > +
> > > +/* Like OVERRIDE_OPTIONS, but run after the optimize, hot, or cold attributes
> > > + are processed. */
> > > +
> > > +#define SECONDARY_OVERRIDE_OPTIONS \
> > > +do { \
> > > + if (!TARGET_SCHEDULE) \
> > > + flag_schedule_insns_after_reload = flag_schedule_insns = 0; \
> > > +} while (0)
> > > +
> > > +
> >
> > You can remove it from override_options in i386.c.
>
> Yes.
>
Second thought. We should replace it with the new macro since
the new marco may depend on override_options.
Thanks.
H.J.