This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ICE in change_address at emit_rtl.c
- From: Per Bothner <per at bothner dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 25 Nov 2001 10:26:53 -0800
- Subject: Re: ICE in change_address at emit_rtl.c
- References: <10111251307.AA27532@vlsi1.ultra.nyu.edu>
SAVE_EXPR causes problems when generating Java bytecodes. We do
this by using the Java parser to build a tree, but then bypassing
the backend to emit .class files directly. The latter does not have
a register allocation pass. That is ok, because we cn use as many
"registers" as we need, and all local variables can be assigned to
"registers" using a trivial stack discipline. However, SAVE_EXPRs
cause problems. It is easy enough to assign a jvm register to a
SAVE_EXPR, but there is no way to reclaim it. This is not a
fatal flaw, but it is wasteful, as it would bloat the stack frame
of a naive interpreter.
This is one reason why fold causes problems as it sometimes
creates SAVE_EXPR. Using a scoped temporary:
let tmp := expr in BODY
would be preferable for us.
Another problem with fold is that it does not obey Java rules
for expression evaluation order. We would probably want to add
a flag to force it to do that.
--Per