LLVM  14.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 
26 namespace llvm {
27 
28 class StringRef;
29 class TargetMachine;
30 
32  bool Xnorm = false;
33 
34  virtual void anchor();
35  ARCInstrInfo InstrInfo;
36  ARCFrameLowering FrameLowering;
37  ARCTargetLowering TLInfo;
39 
40 public:
41  /// This constructor initializes the data members to match that
42  /// of the specified triple.
43  ARCSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS,
44  const TargetMachine &TM);
45 
46  /// Parses features string setting specified subtarget options.
47  /// Definition of function is auto generated by tblgen.
49 
50  const ARCInstrInfo *getInstrInfo() const override { return &InstrInfo; }
51  const ARCFrameLowering *getFrameLowering() const override {
52  return &FrameLowering;
53  }
54  const ARCTargetLowering *getTargetLowering() const override {
55  return &TLInfo;
56  }
57  const ARCRegisterInfo *getRegisterInfo() const override {
58  return &InstrInfo.getRegisterInfo();
59  }
60  const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {
61  return &TSInfo;
62  }
63 
64  bool hasNorm() const { return Xnorm; }
65 };
66 
67 } // end namespace llvm
68 
69 #endif // LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
ARCFrameLowering.h
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::ARCSubtarget::getSelectionDAGInfo
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
Definition: ARCSubtarget.h:60
llvm::ARCSubtarget::hasNorm
bool hasNorm() const
Definition: ARCSubtarget.h:64
ARCISelLowering.h
llvm::ARCTargetLowering
Definition: ARCISelLowering.h:60
llvm::ARCFrameLowering
Definition: ARCFrameLowering.h:27
llvm::ARCSubtarget::getTargetLowering
const ARCTargetLowering * getTargetLowering() const override
Definition: ARCSubtarget.h:54
llvm::ARCSubtarget
Definition: ARCSubtarget.h:31
llvm::SelectionDAGTargetInfo
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
Definition: SelectionDAGTargetInfo.h:31
llvm::ARCSubtarget::getInstrInfo
const ARCInstrInfo * getInstrInfo() const override
Definition: ARCSubtarget.h:50
llvm::ARCSubtarget::getFrameLowering
const ARCFrameLowering * getFrameLowering() const override
Definition: ARCSubtarget.h:51
llvm::ARCSubtarget::ARCSubtarget
ARCSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const TargetMachine &TM)
This constructor initializes the data members to match that of the specified triple.
Definition: ARCSubtarget.cpp:27
llvm::ARCSubtarget::ParseSubtargetFeatures
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
Parses features string setting specified subtarget options.
llvm::ARCInstrInfo::getRegisterInfo
const ARCRegisterInfo & getRegisterInfo() const
Definition: ARCInstrInfo.h:33
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:79
llvm::X86AS::FS
@ FS
Definition: X86.h:188
llvm::ARCSubtarget::getRegisterInfo
const ARCRegisterInfo * getRegisterInfo() const override
Definition: ARCSubtarget.h:57
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
TargetSubtargetInfo.h
ARCGenSubtargetInfo
ARCInstrInfo.h
llvm::ARCInstrInfo
Definition: ARCInstrInfo.h:26
llvm::ARCRegisterInfo
Definition: ARCRegisterInfo.h:25
SelectionDAGTargetInfo.h
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47