From: Christian König <christian.koe...@amd.com> Using the new NearestCommonDominator class.
Signed-off-by: Christian König <christian.koe...@amd.com> --- lib/Target/R600/AMDGPUStructurizeCFG.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Target/R600/AMDGPUStructurizeCFG.cpp b/lib/Target/R600/AMDGPUStructurizeCFG.cpp index ad628c1..eb63e55 100644 --- a/lib/Target/R600/AMDGPUStructurizeCFG.cpp +++ b/lib/Target/R600/AMDGPUStructurizeCFG.cpp @@ -533,12 +533,18 @@ void AMDGPUStructurizeCFG::setPhiValues() { Updater.AddAvailableValue(&Func->getEntryBlock(), Undef); Updater.AddAvailableValue(To, Undef); + NearestCommonDominator Dominator(DT); + Dominator.addBlock(To, false); for (BBValueVector::iterator VI = PI->second.begin(), VE = PI->second.end(); VI != VE; ++VI) { Updater.AddAvailableValue(VI->first, VI->second); + Dominator.addBlock(VI->first); } + if (!Dominator.wasResultExplicitMentioned()) + Updater.AddAvailableValue(Dominator.getResult(), Undef); + for (BBVector::iterator FI = From.begin(), FE = From.end(); FI != FE; ++FI) { -- 1.7.9.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev