[tree-ssa] Gimplifying Java
Jeff Sturm
jsturm@one-point.com
Sat Jun 14 14:56:00 GMT 2003
On Fri, 13 Jun 2003 law@redhat.com wrote:
> How funny -- I was just hashing through this issue with C++ calls which
> throw exceptions. My gut is telling me that another temporary is in
> order for C++.
>
> Calls store their result into a temporary which is then copied into the
> user variable. The CALL_EXPR will end a basic block, so the CALL_EXPR
> and assignment to the user variable will be in different basic blocks
> and assignment to the user variable does not occur if the CALL_EXPR
> throws an exception (and because of how we build the CFG the optimizers
> can figure this out trivially).
I see what you mean now, yes this may be the same thing (except
that Andrew may have alluded to real machines; in many ways the tree
optimizers are like a psuedo-machine that can exhibit similar behavior).
The gcj frontend creates a temporary for the assignment, but not in a very
general way. It seems reasonable that the middle-end ought to handle
this for all languages that can throw exceptions.
Jeff
More information about the Gcc-patches
mailing list