From mboxrd@z Thu Jan 1 00:00:00 1970 From: Per Bothner To: Richard Kenner Cc: gcc@gcc.gnu.org Subject: Re: ICE in change_address at emit_rtl.c Date: Sun, 25 Nov 2001 10:27:00 -0000 Message-ID: <3C0137ED.6080604@bothner.com> References: <10111251307.AA27532@vlsi1.ultra.nyu.edu> X-SW-Source: 2001-11/msg01202.html Message-ID: <20011125102700.s8hW6a2JIUtzITkntWSxXh3N1xSqY8lZyU22Xr55Mv8@z> 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