LLVM 20.0.0git
AVRSubtarget.cpp
Go to the documentation of this file.
1//===-- AVRSubtarget.cpp - AVR 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// This file implements the AVR specific subclass of TargetSubtargetInfo.
10//
11//===----------------------------------------------------------------------===//
12
13#include "AVRSubtarget.h"
14
17
18#include "AVR.h"
19#include "AVRTargetMachine.h"
20
21#define DEBUG_TYPE "avr-subtarget"
22
23#define GET_SUBTARGETINFO_TARGET_DESC
24#define GET_SUBTARGETINFO_CTOR
25#include "AVRGenSubtargetInfo.inc"
26
27namespace llvm {
28
29AVRSubtarget::AVRSubtarget(const Triple &TT, const std::string &CPU,
30 const std::string &FS, const AVRTargetMachine &TM)
31 : AVRGenSubtargetInfo(TT, CPU, /*TuneCPU*/ CPU, FS), InstrInfo(*this),
32 TLInfo(TM, initializeSubtargetDependencies(CPU, FS, TM)) {
33 // Parse features string.
34 ParseSubtargetFeatures(CPU, /*TuneCPU*/ CPU, FS);
35}
36
39 const TargetMachine &TM) {
40 // Parse features string.
41 ParseSubtargetFeatures(CPU, /*TuneCPU*/ CPU, FS);
42 return *this;
43}
44
45} // end of namespace llvm
A specific AVR target MCU.
Definition: AVRSubtarget.h:32
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
Parses a subtarget feature string, setting appropriate options.
AVRSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const AVRTargetMachine &TM)
Creates an AVR subtarget.
AVRSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS, const TargetMachine &TM)
A generic AVR implementation.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
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