LLVM 20.0.0git
ARCSubtarget.h
Go to the documentation of this file.
1//===- ARCSubtarget.h - Define Subtarget for the ARC ------------*- C++ -*-===//
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 declares the ARC specific subclass of TargetSubtargetInfo.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
14#define LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
15
16#include "ARCFrameLowering.h"
17#include "ARCISelLowering.h"
18#include "ARCInstrInfo.h"
21#include <string>
22
23#define GET_SUBTARGETINFO_HEADER
24#include "ARCGenSubtargetInfo.inc"
25
26namespace llvm {
27
28class StringRef;
29class TargetMachine;
30
32 virtual void anchor();
33 ARCInstrInfo InstrInfo;
34 ARCFrameLowering FrameLowering;
35 ARCTargetLowering TLInfo;
37
38 // ARC processor extensions
39 bool Xnorm = false;
40
41public:
42 /// This constructor initializes the data members to match that
43 /// of the specified triple.
44 ARCSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS,
45 const TargetMachine &TM);
46
47 /// Parses features string setting specified subtarget options.
48 /// Definition of function is auto generated by tblgen.
50
51 const ARCInstrInfo *getInstrInfo() const override { return &InstrInfo; }
52 const ARCFrameLowering *getFrameLowering() const override {
53 return &FrameLowering;
54 }
55 const ARCTargetLowering *getTargetLowering() const override {
56 return &TLInfo;
57 }
58 const ARCRegisterInfo *getRegisterInfo() const override {
59 return &InstrInfo.getRegisterInfo();
60 }
62 return &TSInfo;
63 }
64
65 bool hasNorm() const { return Xnorm; }
66};
67
68} // end namespace llvm
69
70#endif // LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
const ARCRegisterInfo & getRegisterInfo() const
Definition: ARCInstrInfo.h:33
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
Parses features string setting specified subtarget options.
const ARCTargetLowering * getTargetLowering() const override
Definition: ARCSubtarget.h:55
bool hasNorm() const
Definition: ARCSubtarget.h:65
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
Definition: ARCSubtarget.h:61
const ARCInstrInfo * getInstrInfo() const override
Definition: ARCSubtarget.h:51
const ARCFrameLowering * getFrameLowering() const override
Definition: ARCSubtarget.h:52
const ARCRegisterInfo * getRegisterInfo() const override
Definition: ARCSubtarget.h:58
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
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