aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/GCNVOPDUtils.h
blob: f776ae95e79c447838e77a889c389aac3625e64e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//===- GCNVOPDUtils.h - GCN VOPD Utils  ------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
/// \file This file contains the AMDGPU DAG scheduling
/// mutation to pair VOPD instructions back to back. It also contains
//  subroutines useful in the creation of VOPD instructions
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIB_TARGET_AMDGPU_VOPDUTILS_H
#define LLVM_LIB_TARGET_AMDGPU_VOPDUTILS_H

#include "llvm/CodeGen/MachineScheduler.h"

namespace llvm {

class SIInstrInfo;

bool checkVOPDRegConstraints(const SIInstrInfo &TII,
                             const MachineInstr &FirstMI,
                             const MachineInstr &SecondMI, bool IsVOPD3);

std::unique_ptr<ScheduleDAGMutation> createVOPDPairingMutation();

} // namespace llvm

#endif // LLVM_LIB_TARGET_AMDGPU_VOPDUTILS_H