This is the mail archive of the gcc-patches@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: [patch] Lno branch merge part 8 -- canonical induction variablecreation


On Sat, 21 Aug 2004, Zdenek Dvorak wrote:

> Hello,
> 
> > The simplest fix is to add a test for "TYPE_UNSIGNED () || flag_wrapv"
> > to the problematic transformation in your code.
> 
> unfortunately this is not possible since it would totally cripple whole
> optimization (many of interesting induction variables are signed).

In that case the flags will need adding to expressions.

Note that loop optimizations with wrapping signed induction variables have 
to allow for the possibility that the loop might wrap around (induction 
variable, being incremented, goes from positive to negative) unless you 
can prove the loop bounds are such that this doesn't happen.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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