This is the mail archive of the 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, commited] for PR 31885

On 5/10/07, Zdenek Dvorak <> wrote:

scev analysis considers NULL_TREE (aka chrec_not_analyzed_yet) to be a special
chrec.  This is somewhat problematic, as NULL_TREE usually appears as an
operand of ARRAY_REFs and COMPONENT_REFs.  In the testcase (loop-29.c)
we determine that the evolution of the control variable is {&a[1], +, cst}.
Number of iterations analysis then asks whether
chrec_contains_undetermined (&a[1]), and fails; thus we do not remove
the loop, as we failed to determine that it is not an infinite one.

Fortunately, chrec_not_analyzed_yet cannot really appear as a part of an
expression; we only use it as a return value from the cache in case some
ssa name was not analysed yet.  Therefore, to fix this problem it
suffices to prevent chrec_contains_undetermined and
automatically_generated_chrec_p from considering NULL to be special.

Accidentaly, I noticed the problem independently during the rewrite of
data reference analysis; as this piece of the patch is not really
related to the rewrite, I am posting it separately now.

Bootstrapped & regtested on x86_64 and ia64, commited.

Ok, thanks.


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