Sunday, October 18, 2020

GNU GCC Register Transfer Expression RTX




Not a whole lot of documentation available on the topic!  I guess when you find something the hard way, you earned the right to show it off.  But, besides vanity, it's good to document it for future reference.  I can refresh my memory using this page.  It can also prove helpful to others.

Objective: gen_reg_rtx (machine_mode) vs gen_rtx_REG (machine_mode)

Declared: rtl.h

Defined: emit-rtf.c

Returns: a pseudo register/a hardware register (type rtx)

Implementation difference:   gen_reg_rtx asserts if called after compiler's register allocation phase is completed.

Code changes all the time! Above information is valid for GCC v8.3.1 source.

No comments: