This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: (use) useful for avoiding unnecessary compare instructions during cc0->CCmode ?!
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: BjÃrn Haase <bjoern dot m dot haase at web dot de>
- Cc: gcc at gcc dot gnu dot org, Denis Chertykov <denisc at overta dot ru>, marekm at amelek dot gda dot pl
- Date: 14 May 2005 16:39:42 -0300
- Subject: Re: RFC: (use) useful for avoiding unnecessary compare instructions during cc0->CCmode ?!
- References: <200505141106.23525.bjoern.m.haase@web.de>
On May 14, 2005, BjÃrn Haase <bjoern.m.haase@web.de> wrote:
> I.e. expand
> would insert two instructions after the double-set instruction that contain
> the two individual sets and an additional "use" statement. I.e. above
> sequence after expand then would look like
> (parallel[
> (set reg:SI 100) (minus:SI (reg:SI 101) (reg:SI 102))
> (set reg:CC CC_xxx) (compare (reg:SI 101) (reg:SI 102)))])
> (parallel[ (set reg:SI 100) (minus:SI (reg:SI 101) (reg:SI 102))
> (use (reg:SI 100) ])
> (parallel[ (set reg:CC_xxx CC) (compare (reg:SI 101) (reg:SI 102)))
> (use (reg:CC])
You'd then have to some how arrange for the second and third insns to
not be removed as redundant, and come up with some additional work
around for the case when there's an overlap between output and input.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}