1480093f4SDimitry Andric //===- AMDGPUGlobalISelUtils -------------------------------------*- C++ -*-==// 2480093f4SDimitry Andric // 3480093f4SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4480093f4SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5480093f4SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6480093f4SDimitry Andric // 7480093f4SDimitry Andric //===----------------------------------------------------------------------===// 8480093f4SDimitry Andric 9480093f4SDimitry Andric #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUGLOBALISELUTILS_H 10480093f4SDimitry Andric #define LLVM_LIB_TARGET_AMDGPU_AMDGPUGLOBALISELUTILS_H 11480093f4SDimitry Andric 12fe6060f1SDimitry Andric #include "llvm/ADT/ArrayRef.h" 13480093f4SDimitry Andric #include "llvm/CodeGen/Register.h" 14e8d8bef9SDimitry Andric #include <utility> 15480093f4SDimitry Andric 16480093f4SDimitry Andric namespace llvm { 17480093f4SDimitry Andric 18480093f4SDimitry Andric class MachineRegisterInfo; 19*81ad6265SDimitry Andric class GCNSubtarget; 20*81ad6265SDimitry Andric class LLT; 21480093f4SDimitry Andric 22480093f4SDimitry Andric namespace AMDGPU { 23480093f4SDimitry Andric 24e8d8bef9SDimitry Andric /// Returns base register and constant offset. 25e8d8bef9SDimitry Andric std::pair<Register, unsigned> 26480093f4SDimitry Andric getBaseWithConstantOffset(MachineRegisterInfo &MRI, Register Reg); 27480093f4SDimitry Andric 285ffd83dbSDimitry Andric bool isLegalVOP3PShuffleMask(ArrayRef<int> Mask); 29*81ad6265SDimitry Andric bool hasAtomicFaddRtnForTy(const GCNSubtarget &Subtarget, const LLT &Ty); 30480093f4SDimitry Andric } 31480093f4SDimitry Andric } 32480093f4SDimitry Andric 33480093f4SDimitry Andric #endif 34