Tomasz Jankowski
2012-10-02 20:17:42 UTC
Hello,
I'm implementing new RTL pass in GCC. I attached current C source with
my RTL pass. I have to use GCC v4.5.1 port for OpenRISC project.
Basically I want to discover all "SET" insns which moves constant
immediate to register. Then I want to insert additional instruction
call right after this move instruction (for now I just want to insert
a copy of found "SET" insn). When I compile this pass with commented
"add_insn_after(...)" (line 70 in attachment) GCC compiles fine and
after installation it discovers SET insn properly. When I uncomment
this "add_insn_after(...)" compilation fails with message:
(...)
../../gcc-4.5.1/gcc/crtstuff.c: In function â__do_global_dtors_auxâ:
../../gcc-4.5.1/gcc/crtstuff.c:332:1: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
(...)
I run my pass just after "expand" pass. This is first time I'm trying
to modify GCC. What am I doing wrong?
I'm implementing new RTL pass in GCC. I attached current C source with
my RTL pass. I have to use GCC v4.5.1 port for OpenRISC project.
Basically I want to discover all "SET" insns which moves constant
immediate to register. Then I want to insert additional instruction
call right after this move instruction (for now I just want to insert
a copy of found "SET" insn). When I compile this pass with commented
"add_insn_after(...)" (line 70 in attachment) GCC compiles fine and
after installation it discovers SET insn properly. When I uncomment
this "add_insn_after(...)" compilation fails with message:
(...)
../../gcc-4.5.1/gcc/crtstuff.c: In function â__do_global_dtors_auxâ:
../../gcc-4.5.1/gcc/crtstuff.c:332:1: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
(...)
I run my pass just after "expand" pass. This is first time I'm trying
to modify GCC. What am I doing wrong?