This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ICE in change_address at emit_rtl.c


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]