This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] CCP inefficiencies
On Fri, 14 Feb 2003, Diego Novillo wrote:
> On Thu, 2003-02-13 at 11:42, Diego Novillo wrote:
> > On Thu, 2003-02-13 at 11:38, law@redhat.com wrote:
> >
> > > Rather than "fixing" fold, we introduce a new, simpler fold_nondestructive
> > > or whatever. The number of cases we care about are actually a small subset
> > > of the cases fold currently handles.
> > >
> > OK. I guess that we only need something along the lines of what Dan
> > suggested: 'is this expression going to be folded into a constant?'
> >
> On second thought, what I said above is completely wrong. Knowing that
> the expression is constant is not enough, we *really* need to fold it to
> compute and return its lattice value from tree-ssa-ccp.c:evaluate_stmt.
I was only talking about replacement, not about evaluation.
For replacement, an expression can't become constant unless you've
replaced at least one variable with a constant.
For evaluation, you can't do it without copying.