expand_builtin_mathfn_2 and re-expanding arguments
Roger Sayle
roger@eyesopen.com
Wed Jun 25 16:49:00 GMT 2003
Jim Wilson wrote:
> It looks like the start_sequence call needs to be before the expand_expr
> calls for op0/op1, so that will be part of the sequence that gets thrown
> away on failure.
Great minds and all that...
This was exactly what I thought, when I recently submitted a patch to
the code to do precisely that. Fortunately, Richard Henderson pointed
out our common mistake. If the expr arguments to expand_expr contain
embedded SAVE_EXPR nodes, then the RTL that defines their values,
which only gets expanded on the first call to expand_expr, also gets
blown away when we call end_sequence on failure.
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02140.html
The good news, however, is that I've just posted a solution to
gcc-patches that should work. Rather than return NULL_RTX on
failure, and have expand_builtin re-evaluate these arguments,
we can stabilize the argument list and invoke expand_call
ourselves to avoid the re-evaluations.
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02817.html
Roger
--
More information about the Gcc
mailing list