Fix trellis layout to avoid mis-identify triangle.
authorDehao Chen <dehao@google.com>
Thu, 23 Mar 2017 23:28:09 +0000 (23:28 +0000)
committerDehao Chen <dehao@google.com>
Thu, 23 Mar 2017 23:28:09 +0000 (23:28 +0000)
commitb197d5b0a00747c0b6d8f82a275f871f3c9240c2
treede0bf01aebebd0b7cb5ec907728eb6cb2bd8077d
parent722e94061baa662a0f41ede6fd0cf6d0dcf5932a
Fix trellis layout to avoid mis-identify triangle.

Summary:
For the following CFG:

A->B
B->C
A->C

If there is another edge B->D, then ABC should not be considered as triangle.

Reviewers: davidxl, iteratee

Reviewed By: iteratee

Subscribers: nemanjai, llvm-commits

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

llvm-svn: 298661
llvm/lib/CodeGen/MachineBlockPlacement.cpp
llvm/test/CodeGen/PowerPC/tail-dup-layout.ll