[BlockPlacement] Disable block placement tail duplciation in structured CFG.
authorTim Shen <timshen91@gmail.com>
Fri, 30 Mar 2018 17:51:00 +0000 (17:51 +0000)
committerTim Shen <timshen91@gmail.com>
Fri, 30 Mar 2018 17:51:00 +0000 (17:51 +0000)
commit1a8c6776a3c848d7d4a6e9af21eb4cd69a4e9793
tree739862cbcb1a0769b0635ef2bf1198616aa963c0
parent478fce9ebfa809e0f75741bbcf1de1a7a379f5c4
[BlockPlacement] Disable block placement tail duplciation in structured CFG.

Summary:
Tail duplication easily breaks the structure of CFG, e.g. duplicating on
a region entry. If the structure is intended to be preserved, then we
may want to configure tail duplication, or disable it for structured
CFG. From our benchmark results disabling it doesn't cause performance
regression.

Notice that this currently affects AMDGPU backend. In the next patch, I
also plan to turn on requiresStructuredCFG for NVPTX.

All unit tests still pass.

Reviewers: jlebar, arsenm

Subscribers: jholewinski, sanjoy, wdng, tpr, hiraditya, llvm-commits

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

llvm-svn: 328884
llvm/lib/CodeGen/MachineBlockPlacement.cpp