[polly] block generators: fix insertion of values in BBMap
Tobias Grosser
tobias at grosser.es
Fri May 24 08:29:41 PDT 2013
On 05/24/2013 03:09 AM, Will Dietz wrote:
> 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.
Hey Will,
this was exactly the explanation I was missing. Thanks a lot.
Sebastian, if this helps you to create or derive a small test case, this
would be awesome. However, if this does not work, I am fine with you
committing the patch as it is, just with a small comment that the above
information to the assert such that people know why this assert may fire.
Thanks,
Tobias
More information about the llvm-commits
mailing list