This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/60827: Inconsistent optimize_function_for_speed_p in in *fixuns_trunc<mode>_1
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 14 Apr 2014 18:54:37 +0200
- Subject: Re: PATCH: PR target/60827: Inconsistent optimize_function_for_speed_p in in *fixuns_trunc<mode>_1
- Authentication-results: sourceware.org; auth=none
- References: <20140411201649 dot GA6750 at intel dot com> <CAFULd4aP=AtZ2YAHSBfW3kW+b5aaQzzOTBqOC01cfh45EiEpZA at mail dot gmail dot com> <20140414164933 dot GA13950 at kam dot mff dot cuni dot cz>
On Mon, Apr 14, 2014 at 6:49 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> 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.
Ops, thanks for sharing this. Based on this explanation, the patch
isn't correct. H.J., please revert it.
Thanks,
Uros.