This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: (use) useful for avoiding unnecessary compare instructions during cc0->CCmode ?!


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}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]