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: PR target/60827: Inconsistent optimize_function_for_speed_p in in *fixuns_trunc<mode>_1


> On Fri, Apr 11, 2014 at 10:16 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> > Since fixuns_trunc<mode>si2 expander checks optimize_insn_for_size_p
> > before generating *fixuns_trunc<mode>_1,  we should use
> > optimize_insn_for_speed_p in *fixuns_trunc<mode>_1 for consistency.
> > OK for trunk?
> >
> > Thanks.
> >
> >
> > H.J.
> > ---
> > 2014-04-11  H.J. Lu  <hongjiu.lu@intel.com>
> >
> >         PR target/60827
> >         * config/i386/i386.md (*fixuns_trunc<mode>_1): Check
> >         optimize_insn_for_speed_p instead of
> >         optimize_function_for_speed_p.
> 
> It looks to me that many, if not all
> optimize_function_for_{speed,size}_p predicates in .md files should be
> converted to corresponding optimize_insn_for_*_p predicates. The later
> predicates apply to BBs, so IMO insn sequences should be handled
> according to BB frequencies, not function frequencies.

You can not convert all predicates, only those in expanders.
The predicates in insn templates must be consistent thorough the compilation
since the insn may come from hot BB to cold BB and you do not want it to become
unrecognizable.

Honza
> 
> The patch is OK for mainline.
> 
> Thanks,
> Uros.


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