This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Tree-SSA and POST_INC address mode inompatible in GCC4?
- From: "J.C. Pizarro" <jcpiza at gmail dot com>
- To: "Kenneth Zadeck" <Kenneth dot Zadeck at NaturalBridge dot com>, gcc at gcc dot gnu dot org
- Date: Sat, 3 Nov 2007 15:46:56 +0100
- Subject: RE: Tree-SSA and POST_INC address mode inompatible in GCC4?
2007/11/3, Kenneth Zadeck wrote:
> I believe that this is something new and is most likely fallout from
> diego's reworking of the tree to rtl converter.
>
> To fix this will require a round of copy propagation, most likely in
> concert with some induction variable detection, since the most
> profitable place for this will be in loops.
>
> I wonder if any of this effects the rtl level induction variable
> discovery?
>
> > Hi, Ramana,
> > I tried the trunk version with/without your patch. It still produces
> > the same code as gcc4.2.2 does. In auto-inc-dec.c, the comments say
> >
> > *a
> > ...
> > a <- a + c
> >
> > becomes
> >
> > *(a += c) post
> >
> > But the problem is after Tree-SSA pass, there is no
> > a <- a + c
> > But something like
> > a_1 <- a + c
> >
> > Unless the auto-inc-dec.c can reverse a_1 <- a + c to a <- a + c. I
> > don't see this transformation is applicable in most scenarios. Any
> > comments?
> >
> > Cheers,
> > Bingfeng
They need to add an algorithm post-SSA that the code reuse the variables
converting a_j <- phi(a_i,...) to a_k <- phi(a_k,...).
The algorithms of POST_INC and POST_DEC are very specific, so an above
general algorithm is sufficient.
J.C. Pizarro