[polly] independent blocks: when moving values, invalidate SCEV cached info

Tobias Grosser tobias at grosser.es
Fri May 3 06:11:11 PDT 2013


On 05/02/2013 10:57 PM, Sebastian Pop wrote:
> Hi,
>
> IndependentBlocks::moveOperandTree already calls SE->forgetValue() in exactly
> one case, however there are other cases where it does not call forgetValue
> leading to crashes due to cached SCEVs that refer to values that no longer
> exist.  The attached patch adds more calls to forgetValue whenever a value is
> moved (and so renamed) to the new code generated for the scop.

Hi Sebastian,

I understand that we may need to forget more values in the 
IndependentBlocks pass, but I am currently still wondering if moving a 
value always invalidates its SCEV. I had the feeling as long the value 
of a SSA instruction does not change, but it is just moved in the 
program there is no need to invalidate the SCEV. Are you sure we need to 
forget the SCEVs at all those places?

Also, I was trying to run the included test case. First of all, the 
command line included does not work as the -polly-region-simplify pass 
was removed two weeks ago. If I remove the -polly-region-simplify pass
and run the test without your patch, I can not reproduce any failure.
I think it would be very good to get some test coverage for this problem.

Thanks,
Tobias



More information about the llvm-commits mailing list