OSDN Git Service

[UnrollRuntime] Fix domTree failures in multiexit unrolling
authorAnna Thomas <anna@azul.com>
Tue, 8 Jan 2019 17:16:25 +0000 (17:16 +0000)
committerAnna Thomas <anna@azul.com>
Tue, 8 Jan 2019 17:16:25 +0000 (17:16 +0000)
commit3f407d73ea13b9e1a68cb11410edee00d0a7002c
tree05a65cd9510ee07ce2d99300490edad41a8c8731
parent87a5aa4fc57022f744123b9a7b9993841ebf1fa9
[UnrollRuntime] Fix domTree failures in multiexit unrolling

Summary:
This fixes the IDom for exit blocks and all blocks reachable from the exit blocks, when runtime unrolling under multiexit/exiting case.
We initially had a restrictive check that the IDom is only updated when
it is the header of the loop.
However, we also need to update the IDom to the correct one when the
IDom is any block within the original loop. See added test cases (which
fail dom tree verification without the patch).

Reviewers: reames, mzolotukhin, mkazantsev, hfinkel

Reviewed by: brzycki, kuhar

Subscribers: zzheng, dmgreen, llvm-commits

Differential Revision: https://reviews.llvm.org/D56284

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350640 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnrollRuntime.cpp
test/Transforms/LoopUnroll/runtime-loop-multiexit-dom-verify.ll