On Mon, Apr 14, 2014 at 6:49 PM, Jan Hubicka <hubi...@ucw.cz> wrote:
>> On Fri, Apr 11, 2014 at 10:16 PM, H.J. Lu <hongjiu...@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...@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.

Reply via email to