This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Loop optimizer issues
- From: <tm_gccmail at mail dot kloo dot net>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Jul 2003 16:59:39 -0700 (PDT)
- Subject: Re: Loop optimizer issues
On Tue, 29 Jul 2003 tm_gccmail@mail.kloo.net wrote:
> On Tue, 29 Jul 2003, Zdenek Dvorak wrote:
>
> > Hello,
> >
> > > > I've been thinking about this proposal and I am not convinced that it
> > > > would be a good idea to merge the two branches.
> > > >
> > > > * The tree-ssa branch is primarily trying to replace RTL passes.
> > > > This may include the loop optimizer. So far, it is not clear
> > > > whether we will actually need to have a sophisticated loop
> > > > optimizer at the RTL level (if at all). The only thing that
> > > > comes to mind that may needed from RTL are:
> > > > * instruction lengths/costs to guide the unroller
> > > > * prefetching capabilities and memory costs to guide
> > > > software pipelining and memory hierarchy optimizations.
> > >
> > > We do BIV-to-GIV conversion and some addressing mode selection in the RTL
> > > loop optimizer. This is critical for targets such as the SH.
> >
> > this is done by the new rtl-level optimizer. The support probably is
> > not flawless, but if you encounter some problems and provide me with
> > more details, I am fairly confident I am able to fix them quickly.
> >
> > Zdenek
>
> Look slike rtlopt-branch has problems for the SH:
>
> dbmatch.i: In function `DBSetupGarbageObject':
> dbmatch.i:4590: internal compiler error: Segmentation fault
>
> I'll file a bug report.
>
> Toshi
That bug appears to occur in config/sh/sh.c so it may be due to an older
sh.c. However, there appear to be other problems:
(gdb) run
Starting program: /home/tm/rtlopt/gcc-build-sh-elf/gcc/cc1 -O2 -m4
g_func.i
g_func.i:450: warning: conflicting types for built-in function `nan'
g_func.i:526: warning: conflicting types for built-in function `nanf'
g_func.i:975: warning: conflicting types for built-in function `vprintf'
g_func.i:976: warning: conflicting types for built-in function `vsprintf'
g_func.i:3772: warning: useless keyword or type name in empty declaration
Move_Done Move_Final Move_Begin Move_Calc AngleMove_Done AngleMove_Final
AngleMove_Begin AngleMove_Calc plat_CalcAcceleratedMove
Program received signal SIGSEGV, Segmentation fault.
0x08212bb7 in refers_to_regno_p (regno=0, endregno=1, x=0x42, loc=0x0)
at ../../gcc/gcc/rtlanal.c:1499
1499 code = GET_CODE (x);
and another file also in the same place:
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/tm/rtlopt/gcc-build-sh-elf/gcc/cc1 -O2 -m4
g_phys.i
g_phys.i:452: warning: conflicting types for built-in function `nan'
g_phys.i:528: warning: conflicting types for built-in function `nanf'
g_phys.i:977: warning: conflicting types for built-in function `vprintf'
g_phys.i:978: warning: conflicting types for built-in function `vsprintf'
g_phys.i:3774: warning: useless keyword or type name in empty declaration
SV_TestEntityPosition SV_CheckVelocity SV_RunThink SV_Impact ClipVelocity
Program received signal SIGSEGV, Segmentation fault.
0x08212bb7 in refers_to_regno_p (regno=0, endregno=1, x=0x4004a, loc=0x0)
at ../../gcc/gcc/rtlanal.c:1499
1499 code = GET_CODE (x);
(gdb) bt
#0 0x08212bb7 in refers_to_regno_p (regno=0, endregno=1, x=0x4004a,
loc=0x0)
at ../../gcc/gcc/rtlanal.c:1499
#1 0x08258295 in prepare_move_operands (operands=0xbffff0f8, mode=SFmode)
at ../../gcc/gcc/config/sh/sh.c:774
#2 0x0818b0cf in gen_movsf (operand0=0x402d7bc0, operand1=0x4004a)
at insn-emit.c:9879
#3 0x08121dc6 in emit_move_insn_1 (x=0x402d7bc0, y=0x4004a)
at ../../gcc/gcc/expr.c:3212
#4 0x081bc46a in gen_move_insn (x=0x402d7bc0, y=0x4004a)
at ../../gcc/gcc/optabs.c:4660
#5 0x082aa145 in replace_store_insn (reg=0x402d7bc0, del=0x402caef4,
bb=0x841ac40) at ../../gcc/gcc/gcse-store.c:756
#6 0x082aa210 in delete_store (expr=0x840bac0, bb=0x841ac40)
at ../../gcc/gcc/gcse-store.c:795
#7 0x082aa44f in store_motion () at ../../gcc/gcc/gcse-store.c:885
#8 0x0823349d in rest_of_compilation (decl=0x402b357c)
at ../../gcc/gcc/toplev.c:3037
#9 0x08071d07 in c_expand_body_1 (fndecl=0x402b357c, nested_p=0)
at ../../gcc/gcc/c-decl.c:6592
#10 0x08072074 in c_expand_body (fndecl=0x402b357c)
at ../../gcc/gcc/c-decl.c:6676
#11 0x08071a6d in finish_function (nested=0, can_defer_p=1)
at ../../gcc/gcc/c-decl.c:6487
#12 0x0804a2ac in yyparse () at c-parse.y:406
#13 0x080967e5 in c_common_parse_file (set_yydebug=0)
at ../../gcc/gcc/c-opts.c:1629
#14 0x08231f56 in compile_file () at ../../gcc/gcc/toplev.c:2248
#15 0x08237778 in do_compile () at ../../gcc/gcc/toplev.c:5659
#16 0x082377dc in toplev_main (argc=4, argv=0xbffff924)
at ../../gcc/gcc/toplev.c:5694
#17 0x4003ab5c in __libc_start_main (main=0x80adcb8 <main>, argc=4,
ubp_av=0xbffff924, init=0x8049228 <_init>, fini=0x82e8100 <_fini>,
rtld_fini=0x4000d634 <_dl_fini>, stack_end=0xbffff91c)
at ../sysdeps/generic/libc-start.c:129
it appears to be a store motion problem?
Toshi