From b60736ec1405bb0a8dd40989f67ef4c93da068ab Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 16 Feb 2021 21:13:02 +0100 Subject: Vendor import of llvm-project main 8e464dd76bef, the last commit before the upstream release/12.x branch was created. --- .../lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp | 36 ++-------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp') diff --git a/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp b/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp index 8124df68f688..ca1e61393e9a 100644 --- a/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp +++ b/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp @@ -13,35 +13,10 @@ //===----------------------------------------------------------------------===// #include "AMDGPU.h" -#include "AMDGPUSubtarget.h" -#include "R600Defines.h" -#include "R600InstrInfo.h" -#include "R600MachineFunctionInfo.h" -#include "R600RegisterInfo.h" #include "MCTargetDesc/AMDGPUMCTargetDesc.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineInstr.h" -#include "llvm/CodeGen/MachineInstrBuilder.h" -#include "llvm/CodeGen/MachineOperand.h" -#include "llvm/IR/CallingConv.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/IR/Function.h" -#include "llvm/Pass.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/raw_ostream.h" -#include -#include -#include +#include "R600MachineFunctionInfo.h" +#include "R600Subtarget.h" #include -#include -#include using namespace llvm; @@ -84,12 +59,7 @@ unsigned CFStack::getLoopDepth() { } bool CFStack::branchStackContains(CFStack::StackItem Item) { - for (std::vector::const_iterator I = BranchStack.begin(), - E = BranchStack.end(); I != E; ++I) { - if (*I == Item) - return true; - } - return false; + return llvm::is_contained(BranchStack, Item); } bool CFStack::requiresWorkAroundForInst(unsigned Opcode) { -- cgit v1.3