LLVM 24.0.0git
SparcTargetParser.h
Go to the documentation of this file.
1//===-- SparcTargetParser - Parser for SPARC target features ----*- 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 implements a target parser to recognise hardware features
10// for SPARC CPUs.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TARGETPARSER_SPARCTARGETPARSER_H
15#define LLVM_TARGETPARSER_SPARCTARGETPARSER_H
16
18#include "llvm/ADT/StringMap.h"
19#include "llvm/ADT/StringRef.h"
22#include <optional>
23
24namespace llvm {
25namespace Sparc {
26
27/// Return true if \p CPU is a processor known to the SPARC backend.
29
30/// Fill \p Values with the names of the processors known to the SPARC
31/// backend.
33
34/// Return \p CPUName, or the default CPU for \p T if \p CPUName is empty.
36 StringRef CPUName = "");
37
38/// Return the features enabled by default for \p CPU, including the ones
39/// they imply, or std::nullopt if \p CPU is not a known processor.
40LLVM_ABI std::optional<StringMap<bool>>
42
43/// Return true if \p Name is a SPARC target feature.
45
46} // namespace Sparc
47} // namespace llvm
48
49#endif
This file defines the StringMap class.
#define LLVM_ABI
Definition Compiler.h:211
#define T
This file defines the SmallVector class.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
LLVM_ABI void fillValidCPUList(SmallVectorImpl< StringRef > &Values)
Fill Values with the names of the processors known to the SPARC backend.
LLVM_ABI std::optional< StringMap< bool > > getSparcDefaultTargetFeatures(StringRef CPU)
Return the features enabled by default for CPU, including the ones they imply, or std::nullopt if CPU...
LLVM_ABI StringRef getNormalizedSparcTargetCPU(const Triple &T, StringRef CPUName="")
Return CPUName, or the default CPU for T if CPUName is empty.
LLVM_ABI bool isValidCPU(StringRef CPU)
Return true if CPU is a processor known to the SPARC backend.
LLVM_ABI bool isValidFeatureName(StringRef Name)
Return true if Name is a SPARC target feature.
This is an optimization pass for GlobalISel generic memory operations.
RelativeUniformCounterPtr Values
Definition InstrProf.h:91