sean yang wrote:
The GCC internals explicitly introduced code manipulation APIs in TREE representation (bsi_insert_before, bsi_remove etc). But I did not see the equivalent for RTL representation.

There is emit_insn_after, emit_insn_before.

There is also the sequence stuff: start_sequence, end_sequence, push_to_sequence, etc. This allows you to emit multiple insns into a sequence, which can then be passed to emit_insn_{after,before}.

Try looking at the function definitions in emit-rtl.c, and various code that uses them.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com

Reply via email to