This is an archive of the discontinued LLVM Phabricator instance.

[loop-unroll] Properly populate LoopInfo for loops cloned in LoopUnrollRuntime.
ClosedPublic

Authored by fhahn on Jan 9 2017, 2:15 PM.

Details

Summary

This fixes Transforms/LoopUnroll/runtime-loop3.ll which failed with
EXTENSIVE_DEBUG, because the cloned basic blocks were not added to the
correct sub-loops in LoopUnrollRuntime.cpp.

Diff Detail

Event Timeline

fhahn updated this revision to Diff 83696.Jan 9 2017, 2:15 PM
fhahn retitled this revision from to [loop-unroll] Properly populate LoopInfo for loops cloned in LoopUnrollRuntime..
fhahn updated this object.
fhahn added reviewers: dexonsmith, mzolotukhin.
fhahn added a subscriber: llvm-commits.
mzolotukhin accepted this revision.Jan 9 2017, 3:20 PM
mzolotukhin edited edge metadata.

Thanks for fixing it! The patch looks good to me, but I'd suggest committing it in two separate pieces: 1) factoring out addClonedBlockToLoopInfo (that should be NFC), 2) fixing CloneLoopBlocks in LoopUnrollRuntime.cpp. Also, I recommend to drop unnecessary whitespace changes.

Michael

This revision is now accepted and ready to land.Jan 9 2017, 3:20 PM
fhahn updated this revision to Diff 83885.Jan 10 2017, 3:37 PM
fhahn edited edge metadata.

Thanks for the comments. I've committed the factoring out in https://reviews.llvm.org/rL291614 and will land the second commit from Phabricator.

fhahn updated this object.Jan 10 2017, 3:38 PM
fhahn closed this revision.Jan 10 2017, 3:54 PM