This is an archive of the discontinued LLVM Phabricator instance.

Fix dominator tree update in LoopVersioning
AbandonedPublic

Authored by sepavloff on Dec 19 2016, 10:18 AM.

Details

Summary

When LoopVersioning clones a loop, the original and cloned loops share the
same exit block. To make dominator tree in sync with CFG the pass sets the
immediate dominator of the exit block to memcheck block. It is however
incorrect if the versioned loop already shares the exit block with another
loop. With this change the dominator is changed only if the original loop
preheader dominates the exit block.

Event Timeline

sepavloff updated this revision to Diff 81973.Dec 19 2016, 10:18 AM
sepavloff retitled this revision from to Fix dominator tree update in LoopVersioning.
sepavloff updated this object.
sepavloff added reviewers: anemet, silviu.baranga.
sepavloff added subscribers: llvm-commits, davide.
anemet edited edge metadata.Dec 19 2016, 10:25 AM

I believe that the change from today to require loop-simplify form for versioning (D27469) should fix this too. Can you please check?

sepavloff abandoned this revision.Dec 19 2016, 9:50 PM

Changes made in D27469 fix this problem too.