This is an archive of the discontinued LLVM Phabricator instance.

Fix assertion in LICM doFinalization()
ClosedPublic

Authored by dpeixott on Sep 10 2014, 5:46 PM.

Details

Summary

The doFinalization method checks that the LoopToAliasSetMap is
empty. LICM populates that map as it runs through the loop nest,
deleting the entries for child loops as it goes. However, if a child
loop is deleted by another pass (e.g. unrolling) then the loop will
never be deleted from the map because LICM walks the loop nest to
find entries it can delete.

The fix is to delete the loop from the map and free the alias set
when the loop is deleted from the loop nest.

Diff Detail

Repository
rL LLVM

Event Timeline

dpeixott updated this revision to Diff 13569.Sep 10 2014, 5:46 PM
dpeixott retitled this revision from to Fix assertion in LICM doFinalization().
dpeixott updated this object.
dpeixott added a subscriber: Unknown Object (MLST).
dpeixott updated this revision to Diff 13598.Sep 11 2014, 1:47 PM

Updated test case to a simplified loop so that is easier to see why it causes a failure.

mcrosier added a subscriber: mcrosier.

Added Andy to the list of reviews as I think he's fairly experienced with LICM.

hfinkel accepted this revision.Sep 23 2014, 10:29 PM
hfinkel added a reviewer: hfinkel.
hfinkel added a subscriber: hfinkel.

LGTM, thanks!

This revision is now accepted and ready to land.Sep 23 2014, 10:29 PM
dpeixott closed this revision.Sep 24 2014, 9:58 AM
dpeixott updated this revision to Diff 14040.

Closed by commit rL218387 (authored by @dpeixott).