OSDN Git Service

AMDGPU: Insert skip branches over return blocks
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 6 Jun 2019 22:51:51 +0000 (22:51 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 6 Jun 2019 22:51:51 +0000 (22:51 +0000)
commit45a0798df680803fa14b02826b262533367c1a99
treefc2c62eb4aea143e6f49a47c78968826f62755a7
parent9332fb0341c400f75d4ccd627fec5d0988ef704d
AMDGPU: Insert skip branches over return blocks

SIInsertSkips really doesn't understand the control flow, and makes
very stupid assumptions about the block layout. This was able to get
away with not skipping return blocks, since usually after
structurization there is only one placed at the end of the
function. Tail duplication can break this assumption.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362754 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIInsertSkips.cpp
lib/Target/AMDGPU/SIInstrInfo.cpp
test/CodeGen/AMDGPU/skip-branch-taildup-ret.mir [new file with mode: 0644]