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: expand_builtin_mathfn_2 and re-expanding arguments


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
--


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