please go ahead
Sun

On Thu, Feb 3, 2011 at 7:53 AM, Min Zhao <mzhao...@gmail.com> wrote:
> Hi,
>
> Would please a gatekeeper review my fix for bug 717?
>
> https://bugs.open64.net/show_bug.cgi?id=717
>
>
>
> The problem happens in setting/resetting the flag ISOP_INVARIANT_VISITED.
> This flag is used in Invariant_cr and Invariant_cr_rec (opt_loop.cxx) to
> remember the OPs found to be loop invariant (to reduce the compile time).
>
>
>
> The flag is set when an CK_OP is found to be loop invariant.
>
> The flag is reset when
>
> 1) cr->opnd(kid) is loop variant, reset cr->opnd(0), ..., cr->opnd(kid-1)
> (line #605)
>
> 2) After finishing recursive function Invariant_cr_rec, if the cr is loop
> invariant, resetting cr’s flag (because the loop invariant information is
> stale for different loops). (line #635)
>
>
>
> The problem is that it misses the fact that a CK_OP can be the child of a
> CK_IVAR. If the CK_OP is loop variant, it is set ISOP_INVARIANT_VISITED. But
> its parent CK_IVAR is loop variant. Thus, CK_OP is never reset. For anther
> loop, although this CK_OP is not loop invariant, it is marked as loop
> invariant because of ISOP_INVARIANT_VISITED.
>
>
>
> Here is the failing test case:
>
> for (s = seg_tab; s - seg_tab < segCount; s++) {
>
>           for (i = s->startCode; i <= s->endCode; i++) {
>
>                   index = s->idDelta + i;
>
>                   if (index < 0 )
>
>                     ttf_fail ("cmap: glyph index out of range [0..%i)",
> index);
>
>             }
>
> }
>
>
>
> The address computation for s->idDelta is set  ISOP_INVARIANT_VISITED for
> the inner loop and never reset. And s->idDelta is NOT loop invariant for the
> outer loop.
>
>
>
> My fix is to reset ISOP_INVARIANT_VISITED for the CK_IVAR if it returns loop
> variant.
>
> Thanks,
>
> Min
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
>

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to