PATCH: Very simple constant propagation (revisited)

Paolo Bonzini bonzini@gnu.org
Fri Mar 19 08:14:00 GMT 2004


> On the contrary, combine.c should lose all its simplification code
> to simplify-rtx.c.  Slowly.

That is long term.  Before that, I intend to create a kind of "rtl hooks" that
extend what I had did with gen_lowpart.  Only after this mechanism is in place
pass-dependent simplifications can be handled by simplify-rtx.c; but in the
scheme I have in mind the pass-dependent code will still stay in the file that
implements the pass, in this case combine.c, so Caroline's code would have
gone into combine.c.

And even before that, for example, things like combine's gen_binary must die,
and similarly for the "last" parameter of combine_simplify_rtx (I have a patch
for that).

Examples of rtl hooks are:
- nonzero_bits and num_sign_bit_copies (most of them are generic, but the CUID
stuff done by combine to track registers is not)
- expand_compound_operation and make_compound_operation (probably too
heavyweight to be done all the way through the compiler)
- lookup_as_function (this time this would remove stuff from fold_rtx)
- ...

Paolo




More information about the Gcc-patches mailing list