xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
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 
12480093f4SDimitry Andric #include "llvm/CodeGen/Register.h"
13e8d8bef9SDimitry Andric #include <utility>
14480093f4SDimitry Andric 
15480093f4SDimitry Andric namespace llvm {
16480093f4SDimitry Andric 
17480093f4SDimitry Andric class MachineRegisterInfo;
1881ad6265SDimitry Andric class GCNSubtarget;
19bdd1243dSDimitry Andric class GISelKnownBits;
2081ad6265SDimitry 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>
26bdd1243dSDimitry Andric getBaseWithConstantOffset(MachineRegisterInfo &MRI, Register Reg,
27*5f757f3fSDimitry Andric                           GISelKnownBits *KnownBits = nullptr,
28*5f757f3fSDimitry Andric                           bool CheckNUW = false);
29480093f4SDimitry Andric }
30480093f4SDimitry Andric }
31480093f4SDimitry Andric 
32480093f4SDimitry Andric #endif
33