This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Code Motion after Machine Dependent Reorganization??
- From: "Balaji V. Iyer" <bviyer at ncsu dot edu>
- To: <gcc at gcc dot gnu dot org>
- Date: Tue, 30 Dec 2008 05:08:54 -0500
- Subject: Code Motion after Machine Dependent Reorganization??
Hello Everyone,
I am currently working on the OpenRISC port of GCC. There isn't much
significant backend optimization implemented, its just a straightforward
port.
Now, is it possible for the code to move between Basic blocks (or
even inside the basic blocks) after machine dependent reorganization
stage? If so, how can I stop it from happening.. or can I?
I printed out the RTL dump using the following code during the machine
dependent reorganization
FOR_EACH_BB(bb) {
for (insn = bb_head(bb); insn != bb_end(bb); insn = NEXT_INSN(insn))
{
if (INSN_P(insn))
print_rtl_single(insn);
}
}
Then I compared with the assembly output and the RTL-equivalent and they
do not come out in the same order.. A couple instructions were even
moved outside a basic-block... Am I going through the instruction chain
in the wrong way?
Any help is deeply appreciated!
Thanks,
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.