On Wed, Mar 3, 2010 at 10:28 AM, Paulo J. Matos <pocma...@gmail.com> wrote: > Hello, > > When handling builtin functions there's the fold_builtin and the > expand_builtin that can be defined. They seem to do their work at > different times but I am not exactly sure if they are alternatives or > complementary. > > Can't find anywhere explaining their use besides what's found in the > internals document. Can anyone have a go at explaining when one or the > other should be used?
They are complementary. The fold_ variants are for simplifications throughout tree passes while the expand_ variant translates builtin calls to target-specific RTL (with falling back to libcalls). Richard. > Cheers, > > -- > PMatos >