LLVM 20.0.0git
R600Subtarget.cpp
Go to the documentation of this file.
1//===-- R600Subtarget.cpp - R600 Subtarget Information --------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9/// \file
10/// Implements the R600 specific subclass of TargetSubtarget.
11//
12//===----------------------------------------------------------------------===//
13
14#include "R600Subtarget.h"
17
18using namespace llvm;
19
20#define DEBUG_TYPE "r600-subtarget"
21
22#define GET_SUBTARGETINFO_TARGET_DESC
23#define GET_SUBTARGETINFO_CTOR
24#include "R600GenSubtargetInfo.inc"
25
27 const TargetMachine &TM)
28 : R600GenSubtargetInfo(TT, GPU, /*TuneCPU*/ GPU, FS), AMDGPUSubtarget(TT),
29 InstrInfo(*this),
30 FrameLowering(TargetFrameLowering::StackGrowsUp, getStackAlignment(), 0),
31 TLInfo(TM, initializeSubtargetDependencies(TT, GPU, FS)),
32 InstrItins(getInstrItineraryForCPU(GPU)) {
34 TSInfo = std::make_unique<AMDGPUSelectionDAGInfo>();
35}
36
38
40 return TSInfo.get();
41}
42
44 StringRef GPU,
45 StringRef FS) {
46 SmallString<256> FullFS("+promote-alloca,");
47 FullFS += FS;
48 ParseSubtargetFeatures(GPU, /*TuneCPU*/ GPU, FullFS);
49
52
53 return *this;
54}
Provides R600 specific target descriptions.
AMDGPU R600 specific subclass of TargetSubtarget.
unsigned AddressableLocalMemorySize
R600Subtarget(const Triple &TT, StringRef CPU, StringRef FS, const TargetMachine &TM)
bool hasCaymanISA() const
~R600Subtarget() override
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
R600Subtarget & initializeSubtargetDependencies(const Triple &TT, StringRef GPU, StringRef FS)
Generation getGeneration() const
Definition: R600Subtarget.h:73
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
Definition: SmallString.h:26
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
Information about stack frame layout on the target.
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:77
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18