Difference between {expand,fold,simplify}_builtin_foo ???

Jeffrey A Law law@redhat.com
Mon Sep 20 18:45:00 GMT 2004


On Mon, 2004-09-20 at 11:41, Kaveh R. Ghazi wrote:
> I've been out of GCC most of the summer, so I don't know if this was
> discussed or not.  I was wondering what's the reason for and
> difference between {expand,fold,simplify}_builtin_foo().
> 
> Looking at e.g. expand_builtin_sprintf and simplify_builtin_sprintf,
> they seem to do exactly the same transformations.  Can we just have
> expand_builtin_sprintf call simplify_builtin_sprintf and then expand
> the result?  This would remove lots of code duplication and potential
> locations of errors.
I thought that had already been done where possible.

The key difference between them is the simplify_ variant is not
allowed to generate RTL nor create non-gimple code.

jeff




More information about the Gcc mailing list