From fb090a675ae78b4b2524b69e42790a8308637cde Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 21 Sep 2015 22:34:16 +0000 Subject: The R600 target got renamed to AMDGPU, but I missed deleting the old directory during the vendor import. Delete it now. --- .../llvm/lib/Target/R600/SIMachineFunctionInfo.cpp | 77 ---------------------- 1 file changed, 77 deletions(-) delete mode 100644 contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.cpp (limited to 'contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.cpp') diff --git a/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.cpp b/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.cpp deleted file mode 100644 index 587ea63..0000000 --- a/contrib/llvm/lib/Target/R600/SIMachineFunctionInfo.cpp +++ /dev/null @@ -1,77 +0,0 @@ -//===-- SIMachineFunctionInfo.cpp - SI Machine Function Info -------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -/// \file -//===----------------------------------------------------------------------===// - - -#include "SIMachineFunctionInfo.h" -#include "AMDGPUSubtarget.h" -#include "SIInstrInfo.h" -#include "llvm/CodeGen/MachineInstrBuilder.h" -#include "llvm/CodeGen/MachineFrameInfo.h" -#include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/LLVMContext.h" - -#define MAX_LANES 64 - -using namespace llvm; - - -// Pin the vtable to this file. -void SIMachineFunctionInfo::anchor() {} - -SIMachineFunctionInfo::SIMachineFunctionInfo(const MachineFunction &MF) - : AMDGPUMachineFunction(MF), - TIDReg(AMDGPU::NoRegister), - HasSpilledVGPRs(false), - PSInputAddr(0), - NumUserSGPRs(0), - LDSWaveSpillSize(0) { } - -SIMachineFunctionInfo::SpilledReg SIMachineFunctionInfo::getSpilledReg( - MachineFunction *MF, - unsigned FrameIndex, - unsigned SubIdx) { - const MachineFrameInfo *FrameInfo = MF->getFrameInfo(); - const SIRegisterInfo *TRI = static_cast( - MF->getSubtarget().getRegisterInfo()); - MachineRegisterInfo &MRI = MF->getRegInfo(); - int64_t Offset = FrameInfo->getObjectOffset(FrameIndex); - Offset += SubIdx * 4; - - unsigned LaneVGPRIdx = Offset / (64 * 4); - unsigned Lane = (Offset / 4) % 64; - - struct SpilledReg Spill; - - if (!LaneVGPRs.count(LaneVGPRIdx)) { - unsigned LaneVGPR = TRI->findUnusedRegister(MRI, &AMDGPU::VGPR_32RegClass); - LaneVGPRs[LaneVGPRIdx] = LaneVGPR; - MRI.setPhysRegUsed(LaneVGPR); - - // Add this register as live-in to all blocks to avoid machine verifer - // complaining about use of an undefined physical register. - for (MachineFunction::iterator BI = MF->begin(), BE = MF->end(); - BI != BE; ++BI) { - BI->addLiveIn(LaneVGPR); - } - } - - Spill.VGPR = LaneVGPRs[LaneVGPRIdx]; - Spill.Lane = Lane; - return Spill; -} - -unsigned SIMachineFunctionInfo::getMaximumWorkGroupSize( - const MachineFunction &MF) const { - const AMDGPUSubtarget &ST = MF.getSubtarget(); - // FIXME: We should get this information from kernel attributes if it - // is available. - return getShaderType() == ShaderType::COMPUTE ? 256 : ST.getWavefrontSize(); -} -- cgit v1.1