This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Inserting Custom RTLs by the Haifa Scheduler
- From: Revital1 Eres <ERES at il dot ibm dot com>
- To: "Balaji V. Iyer" <bviyer at ncsu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 26 Oct 2008 09:19:54 +0200
- Subject: Re: Inserting Custom RTLs by the Haifa Scheduler
Hello,
> I am currently working on OpenRISC port of GCC-4.0.2, and I have to
> insert a custom RTL (which gets translated to an instruction) at fixed
> parts of the code. I have created the custom instruction (by modifying
> RTL.DEF) and then put the appropritae constraints in my .md file.
>
> Now, I want this instructoin to be inserted at specific points...How
> can I do it? What function shiould I call to output this RTL?
You can use the following function to emit the new RTL instruction
you created:
emit_insn (gen_rtx_NEW_OP ...)
To insert the instruction in specific point (in this example; before insn)
you can use the following sequence:
start_sequence ();
emit_insn (gen_rtx_NEW_OP ...)
seq = get_insns ();
end_sequence ();
emit_insn_before (seq, insn);)
HTH,
Revital
>
> Any help is highly appreciated!
>
> Please CC me in the answer since I am not a subscribed member of GCC.
>
> Regards,
>
> Balaji V. Iyer.
>
> --
>
> Balaji V. Iyer
> PhD Candidate,
> Center for Efficient, Scalable and Reliable Computing,
> Department of Electrical and Computer Engineering,
> North Carolina State University.
>
>