This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] where to fix this?
- From: law at redhat dot com
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, Dale Johannesen <dalej at apple dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 08 Jan 2004 23:34:07 -0700
- Subject: Re: [tree-ssa] where to fix this?
- Reply-to: law at redhat dot com
In message <Pine.LNX.4.44.0401061319210.9110-100000@www.eyesopen.com>, Roger Sa
yle writes:
>
>On Tue, 6 Jan 2004, Jan Hubicka wrote:
>> > The callback is set up by the front-end to call a front-end routine.
>> Yes, but what is unclear to me is how the front-end routine would look
>> like...
>
>My vote for the reorganization of "fold", and the passing of additional
>parameters, is to do something like the current implementation of
>"fold_initializer" in fold-const.c. The interface is simple to the
>outside world, sets up the required behaviour of "fold" and then
>invokes fold itself.
Seems reasonable to me. Though I would tend to worry about getting a
ton of functions, particularly since I want to be able to call into
the folder without generating a tree expression all the time. ie,
ada_fold_gimple_relational
f90_fold_gimple_unary
f95_fold_nongimple_binary
c_fold_expr
But I guess if we put them into the lang hooks or something like that
we'd just do something like
fold_gimple_relational (opcode, type, op0, op1)
Where fold_gimple_relational is an appropriate #define which looks in
the lang hooks.
jeff