This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Constant folding and Constant propagation
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Jean Christophe Beyler <jean dot christophe dot beyler at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 5 Feb 2009 12:46:01 -0800
- Subject: Re: Constant folding and Constant propagation
- References: <c568a2600902051234i35e77cebu23db6d54c7a0743a@mail.gmail.com>
On Thu, Feb 05, 2009 at 12:34:14PM -0800, Jean Christophe Beyler wrote:
> I'm currently working on removing the constant folding and constant
> propagation because, on the architecture I'm working on, it is highly
> costly to move a constant into a register if the number is big (we can
> say over 16 bits).
But in practice most constants that cprop deals with are values like
-1, 0, 1, or 2. Wouldn't it be better to be able to constrain cprop
based on the values of the constants, than to eliminate it altogether?