This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, middle-end]: Introduce TARGET_LEGITIMATE_COMBINED_INSN target hook
On Sun, Aug 26, 2012 at 12:24 PM, Georg-Johann Lay <gjl@gcc.gnu.org> wrote:
>
>> Actually a v3 of TARGET_REJECT_COMBINED_INSN target hook.
>>
>> Changes:
>> - rename the hook and reverse the return value
>>
>> 2012-08-25 Uros Bizjak <ubizjak@gmail.com>
>>
>> * target.def (legitimate_combined_insn): New target hook.
>> * doc/tm.texi.in (TARGET_LEGITIMATE_COMBINED_INSN): New hook.
>> * doc/tm.texi: Regenerated.
>> * combine.c (recog_for_combine): Call
>> targetm.legitimate_combined_insn
>> to allow targets to reject combined insn.
>> * hooks.h (hook_bool_rtx_true): New.
>> * hooks.c (hook_bool_rtx_true): Ditto.
>>
>> Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32},
>> also with target-dependant x86 patch that implements the hook.
>
> Sorry for yet another question.
>
> I had the situation where the decision depends on the values held in the
> registers (not for x86) like zeroed bits.
>
> Is that information available at the time the hook is called and could
> it be passed down to the backend?
No, it is not yet available. You can get const_int there as an
operand, but values in registers are not known.
Uros.