[polly] block generators: fix insertion of values in BBMap

Will Dietz w at wdtz.org
Fri May 24 03:09:44 PDT 2013


The error is likely due to BBMap[Load] being evaluated first (creating
a {Load -> uninitialized } entry in the DenseMap), then
generateScalarLoad eventually accesses the same element and finds it
to be NULL (DenseMap[Old])..  Offhand I'm not sure if this is
guaranteed to be NULL or if it's uninitialized and happens to be NULL.

The same issue can also go wrong in an even worse way: the second
DenseMap access can trigger a rehash and *invalidate* the an earlier
evaluated expression (for example LHS of the assignment), leading to a
crash when performing the assignment store.

~Will

On Tue, May 21, 2013 at 1:16 PM, Sebastian Pop <spop at codeaurora.org> wrote:
> Tobias Grosser wrote:
>> On 05/03/2013 01:35 PM, Tobias Grosser wrote:
>> >On 05/03/2013 07:22 PM, Sebastian Pop wrote:
>> >>Tobias Grosser wrote:
>> >>>On 05/02/2013 11:19 PM, Sebastian Pop wrote:
>> [...
>>
>> >>>This is very surprising. I don't really understand how this fixes
>> >>>the problem. Can you provide a reduced test case?
>> >>
>> >>Nop, I cannot provide a reduced testcase: the most reduced one that I
>> >>remember
>> >>having seen spans over several screens of bytecode.  It occurs in one
>> >>of the
>> >>benchmarks in the test-suite with -polly-codegen-scev=true.
>> >
>> >Can you send me this one?
>>
>> Hi Sebastian,
>>
>> would you mind sending this test case to me?
>
> I have lost the original testcase, so I'm reducing another testcase: I don't see
> the same patterns occurring in the current tree, and I also have noted several
> new regressions after we removed RegionSimplify. Even in our current testsuite,
> we have an ICE with scev-codegen on: Isl/CodeGen/20110226-PHI-Node-removed.ll
>
> Sebastian
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> hosted by The Linux Foundation
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list