]> granicus.if.org Git - llvm/commit
[Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination
authorJakub Kuderski <kubakuderski@gmail.com>
Tue, 1 Oct 2019 18:27:17 +0000 (18:27 +0000)
committerJakub Kuderski <kubakuderski@gmail.com>
Tue, 1 Oct 2019 18:27:17 +0000 (18:27 +0000)
commitcc1c78d945fdeab945add7d9584d179346d240b2
treed50d576dabfb9090fb7b3507750eafbc72b45e30
parent7ef8b50e78e409b97bd56d7b4b1eb39a661be7a4
[Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination

Summary:
PHIElimination modifies CFG and marks MachineDominatorTree as preserved. Therefore, it the CFG changes it should also update the MDT, when available. This patch teaches PHIElimination to recalculate MDT when necessary.

This fixes the `tailmerging_in_mbp.ll` test failure discovered after switching to generic DomTree verification algorithm in MachineDominators in D67976.

Reviewers: arsenm, hliao, alex-t, rampitec, vpykhtin, grosser

Reviewed By: rampitec

Subscribers: MatzeB, wdng, hiraditya, javed.absar, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373377 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineScheduler.cpp
lib/CodeGen/PHIElimination.cpp