This is the mail archive of the
mailing list for the GCC project.
- To: Zack Weinberg <weinberg at cygnus dot com>, Richard Henderson <rth at cygnus dot com>
- Subject: PR2912
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 24 May 2001 21:22:58 -0700
- Cc: gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
PR2912 is the result of the new cmpstr peepholes in the x86 back-end.
The problem is that these peepholes fall afoul of what looks to be an
undocumented restriction on peepholes: they must not change the set of
live registers. The new peepholes get rid of instructions we don't
need that mess with `al' and `dl' -- and thereby make those registers
no longer killed.
There are a two ways I can see to fix this problem:
- Add CLOBBERS for the registers, so that we maintain the invariant.
I am leaning towards this solution on the branch, since it seems
- Make peephole2_optimize update the liveness information when its
done peepholing. We already do this for targets with conditional
execution, but we go to some lengths to avoid it for targets
that do not have conditional execution.
Since we do not (presently) try to reallocate registers in any way
after peephole2, there should actually be no harm in adding the
clobbers; we're not smart enough to use the registers anyhow. Still,
it seems somewhat inelegant.
In any case, if I am correct that this is an implicit restriction on
peepholes, we should document it. And if I am incorrect, then I'm way
confused, and someone should leave me out of this maze of twistly
little registers, all alike.
Which is it?
Mark Mitchell email@example.com
CodeSourcery, LLC http://www.codesourcery.com