2012-12-11 22:25:42 +01:00
|
|
|
//===-- R600RegisterInfo.h - R600 Register Info Interface ------*- C++ -*--===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
/// \file
|
|
|
|
/// \brief Interface definition for R600RegisterInfo
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2016-03-11 09:00:27 +01:00
|
|
|
#ifndef LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
|
|
|
|
#define LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
|
2012-12-11 22:25:42 +01:00
|
|
|
|
|
|
|
#include "AMDGPURegisterInfo.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2014-06-13 03:32:00 +02:00
|
|
|
class AMDGPUSubtarget;
|
2012-12-11 22:25:42 +01:00
|
|
|
|
2016-03-11 09:00:27 +01:00
|
|
|
struct R600RegisterInfo final : public AMDGPURegisterInfo {
|
2013-05-17 18:50:56 +02:00
|
|
|
RegClassWeight RCW;
|
2012-12-11 22:25:42 +01:00
|
|
|
|
2015-03-11 19:43:21 +01:00
|
|
|
R600RegisterInfo();
|
2012-12-11 22:25:42 +01:00
|
|
|
|
2014-04-29 09:57:24 +02:00
|
|
|
BitVector getReservedRegs(const MachineFunction &MF) const override;
|
2012-12-11 22:25:42 +01:00
|
|
|
|
|
|
|
/// \brief get the HW encoding for a register's channel.
|
|
|
|
unsigned getHWRegChan(unsigned reg) const;
|
|
|
|
|
2016-06-24 08:30:11 +02:00
|
|
|
unsigned getHWRegIndex(unsigned Reg) const;
|
2013-11-14 00:36:50 +01:00
|
|
|
|
2012-12-11 22:25:42 +01:00
|
|
|
/// \brief get the register class of the specified type to use in the
|
|
|
|
/// CFGStructurizer
|
2015-09-19 08:41:10 +02:00
|
|
|
const TargetRegisterClass *getCFGStructurizerRegClass(MVT VT) const;
|
2012-12-11 22:25:42 +01:00
|
|
|
|
2014-04-29 09:57:24 +02:00
|
|
|
const RegClassWeight &
|
|
|
|
getRegClassWeight(const TargetRegisterClass *RC) const override;
|
2013-05-17 18:50:56 +02:00
|
|
|
|
2016-07-09 20:11:15 +02:00
|
|
|
// \returns true if \p Reg can be defined in one ALU clause and used in
|
|
|
|
// another.
|
2014-04-30 07:53:27 +02:00
|
|
|
bool isPhysRegLiveAcrossClauses(unsigned Reg) const;
|
2016-07-09 20:11:15 +02:00
|
|
|
|
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
|
|
|
|
unsigned FIOperandNum,
|
|
|
|
RegScavenger *RS = nullptr) const override;
|
2012-12-11 22:25:42 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End namespace llvm
|
|
|
|
|
2014-08-13 18:26:38 +02:00
|
|
|
#endif
|