
We form VOPD instructions in the GCNCreateVOPD pass by combining back-to-back component instructions. There are strict register constraints for creating a legal VOPD, namely that the matching operands (e.g. src0x and src0y, src1x and src1y) must be in different register banks. We add a PostRA scheduler mutation to put possible VOPD components back-to-back. Depends on D128442, D128270 Reviewed By: #amdgpu, rampitec Differential Revision: https://reviews.llvm.org/D128656
33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
//===- 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);
|
|
|
|
std::unique_ptr<ScheduleDAGMutation> createVOPDPairingMutation();
|
|
|
|
} // namespace llvm
|
|
|
|
#endif // LLVM_LIB_TARGET_AMDGPU_VOPDUTILS_H
|