[polly] block generators: fix insertion of values in BBMap
Sebastian Pop
spop at codeaurora.org
Thu May 2 14:19:08 PDT 2013
Hi,
When BBMap contains a new value for an old value, i.e., BBMap.count(Old) > 0,
BBMap[Old] should not be NULL. The attached patch adds an assert to verify this
property.
The patch also transforms the insertions into BBMap to avoid storing NULL
pointers in the map. I do not know why the existing code stores NULL pointers:
BBMap[Load] = generateScalarLoad(...);
whereas storing the value into a temporary before inserting in BBMap does not:
Value *NewLoad = generateScalarLoad(...);
BBMap[Load] = NewLoad;
Looks like a bug due to the order of evaluation of the arguments of a function.
Ok to commit?
Thanks,
Sebastian
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-insertion-of-values-in-BBMap.patch
Type: text/x-diff
Size: 1334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130502/4713e51f/attachment.patch>
More information about the llvm-commits
mailing list