Printing rtl instruction name

Chung-Ju Wu jasonwucj@gmail.com
Fri Aug 2 14:48:00 GMT 2013


2013/8/2 Abdul Wahid Memon <engrwahidmemon@gmail.com>:
> Considering the following rtx
>
> (insn 123 122 125 3 (set (reg:DI 531 [ pretmp.143 ])
>         (sign_extend:DI (reg/v:SI 594 [ stride ]))) sum.c:19 126
> {*extendsidi2_rex64}
>      (nil))
>
> Is there any function available in RTL API which could extract the
> instruction name i.e. extendsidi2_rex64?
>

AFAIK the API you require is get_insn_name() in insn-output.c,
which is generated automatically by the program 'genoutput' from
your machine description design during the building process.

You can refer to print_rtx() function in gcc/print-rtl.c for more
implementation detail.


Best regards,
jasonwucj



More information about the Gcc-help mailing list