OSDN Git Service

[LoopSimplifyCFG] Form LCSSA when a parent loop becomes a sibling
authorMax Kazantsev <max.kazantsev@azul.com>
Thu, 17 Jan 2019 12:51:10 +0000 (12:51 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Thu, 17 Jan 2019 12:51:10 +0000 (12:51 +0000)
commita3ca8ce0e5f93f48411afba2788ebfb954d0602c
treec42e2fe80d04fddd3e9b6e2e78f5de16088eb7ec
parent5865df5baae7b74fa87311ce3867244183cc1325
[LoopSimplifyCFG] Form LCSSA when a parent loop becomes a sibling

During the transforms in LoopSimplifyCFG, when we remove a dead exiting edge, the
parent loop may stop being reachable from the child loop, and therefore they become
siblings. If the former child loop had uses of some values from its former parent loop,
now such uses will require LCSSA Phis, even if they weren't needed before. So we must
form LCSSA for all loops that stopped being ancestors of the current loop in this case.

Differential Revision: https://reviews.llvm.org/D56144
Reviewed By: fedor.sergeev

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351434 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopSimplifyCFG.cpp
test/Transforms/LoopSimplifyCFG/lcssa.ll