Skip to content

Commit

Permalink
Overwritten with: 0cd3f3e [AMDGPU] Don't remove short branches over k…
Browse files Browse the repository at this point in the history
…ills

Based on upstream llvm : b54aa05 Update clang-interpreter example to incorporate changes in ce2207a.

Local changes since 861404a:
0cd3f3e [AMDGPU] Don't remove short branches over kills

Added AMD modification notices and removed some GPL files.

Change-Id: I500f5772f5b844856a726845d2fbd4e84493fe80
  • Loading branch information
trenouf committed Feb 6, 2020
2 parents 861404a + 0cd3f3e commit 71e5ca0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/lib/Target/AMDGPU/SIRemoveShortExecBranches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Modifications Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved.
// Notified per clause 4(b) of the license.
//
//===----------------------------------------------------------------------===//
//
Expand Down Expand Up @@ -96,6 +98,9 @@ bool SIRemoveShortExecBranches::mustRetainExeczBranch(
if (TII->hasUnwantedEffectsWhenEXECEmpty(*I))
return true;

if (TII->isKillTerminator(I->getOpcode()))
return true;

// These instructions are potentially expensive even if EXEC = 0.
if (TII->isSMRD(*I) || TII->isVMEM(*I) || TII->isFLAT(*I) ||
I->getOpcode() == AMDGPU::S_WAITCNT)
Expand Down

0 comments on commit 71e5ca0

Please sign in to comment.