Tweak BB analysis for dr_analyze_innermost
dr_analyze_innermost had a "struct loop *nest" parameter that acted
like a boolean. This was added in r179161, with the idea that a
null nest selected BB-level analysis rather than loop analysis.
The handling seemed strange though. If the DR was part of a loop,
we still tried to express the base and offset values as IVs, potentially
giving a nonzero step. If that failed for any reason, we'd revert to
using the original base and offset, just as we would if we hadn't asked
for an IV in the first place.
It seems more natural to use the !in_loop handling whenever nest is null
and always set the step to zero. This actually enables one more SLP
opportunity in bb-slp-pr65935.c.
I checked out r179161 and tried the patch there. The test case added
in that revision still passes, so I don't think there was any particular
need to check simple_iv.
2017-06-28 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
parameter with a "loop" parameter and use it instead of the
loop containing DR_STMT. Don't check simple_iv when doing
BB analysis. Describe the two analysis modes in the comment.
gcc/testsuite/
* gcc.dg/vect/bb-slp-pr65935.c: Expect SLP to be used in main
as well.
From-SVN: r249896