LLVM 22.0.0git
PPCTargetParser.h
Go to the documentation of this file.
1//===---- PPCTargetParser - Parser for 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 PPC CPUs.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TARGETPARSER_PPCTARGETPARSER_H
15#define LLVM_TARGETPARSER_PPCTARGETPARSER_H
16
17#include "TargetParser.h"
18#include "llvm/ADT/StringMap.h"
19#include "llvm/ADT/StringRef.h"
22
23namespace llvm {
24namespace PPC {
28
29// Get target CPU name.
30// If CPUName is empty or generic, return the default CPU name.
31// If CPUName is not empty or generic, return the normalized CPU name.
33 StringRef CPUName = "");
34
35// Get the tune CPU name.
37 StringRef CPUName = "");
38
39// For PPC, there are some cpu names for same CPU, like pwr10 and power10,
40// normalize them.
42
43LLVM_ABI std::optional<llvm::StringMap<bool>>
45
46} // namespace PPC
47} // namespace llvm
48
49#endif
This file defines the StringMap class.
#define LLVM_ABI
Definition: Compiler.h:213
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:574
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:47
LLVM_ABI StringRef getNormalizedPPCTargetCPU(const Triple &T, StringRef CPUName="")
LLVM_ABI std::optional< llvm::StringMap< bool > > getPPCDefaultTargetFeatures(const Triple &T, StringRef CPUName)
LLVM_ABI bool isValidCPU(StringRef CPU)
LLVM_ABI StringRef normalizeCPUName(StringRef CPUName)
LLVM_ABI void fillValidTuneCPUList(SmallVectorImpl< StringRef > &Values)
LLVM_ABI StringRef getNormalizedPPCTuneCPU(const Triple &T, StringRef CPUName="")
LLVM_ABI void fillValidCPUList(SmallVectorImpl< StringRef > &Values)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18