This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a question about code instrumentation in RTL level


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]