//===- CodeGenTarget.h - Target Class Wrapper -------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines wrappers for the Target class and related global // functionality. This makes it easier to access the data and provides a single // place that needs to check it for validity. All of these classes abort // on error conditions. // //===----------------------------------------------------------------------===// #ifndef LLVM_UTILS_TABLEGEN_COMMON_CODEGENTARGET_H #define LLVM_UTILS_TABLEGEN_COMMON_CODEGENTARGET_H #include "Basic/SDNodeProperties.h" #include "CodeGenHwModes.h" #include "CodeGenInstruction.h" #include "InfoByHwMode.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/CodeGenTypes/MachineValueType.h" #include <cassert> #include <memory> #include <optional> #include <string> #include <vector> namespace llvm { class RecordKeeper; class Record; class CodeGenRegBank; class CodeGenRegister; class CodeGenRegisterClass; class CodeGenSchedModels; class CodeGenSubRegIndex; /// getValueType - Return the MVT::SimpleValueType that the specified TableGen /// record corresponds to. MVT::SimpleValueType getValueType(const Record *Rec); StringRef getName(MVT::SimpleValueType T); StringRef getEnumName(MVT::SimpleValueType T); /// getQualifiedName - Return the name of the specified record, with a /// namespace qualifier if the record contains one. std::string getQualifiedName(const Record *R); /// CodeGenTarget - This class corresponds to the Target class in the .td files. /// class CodeGenTarget { … }; /// ComplexPattern - ComplexPattern info, corresponding to the ComplexPattern /// tablegen class in TargetSelectionDAG.td class ComplexPattern { … }; } // namespace llvm #endif // LLVM_UTILS_TABLEGEN_COMMON_CODEGENTARGET_H