LLVM 22.0.0git
AArch64AttributeParser.cpp
Go to the documentation of this file.
1//===-- AArch64AttributeParser.cpp - AArch64 Build Attributes PArser------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with
4// LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===---------------------------------------------------------------------===//
9
12
13std::vector<llvm::SubsectionAndTagToTagName> &
14llvm::AArch64AttributeParser::returnTagsNamesMap() {
15 static std::vector<SubsectionAndTagToTagName> TagsNamesMap = {
16 {"aeabi_pauthabi", 1, "Tag_PAuth_Platform"},
17 {"aeabi_pauthabi", 2, "Tag_PAuth_Schema"},
18 {"aeabi_feature_and_bits", 0, "Tag_Feature_BTI"},
19 {"aeabi_feature_and_bits", 1, "Tag_Feature_PAC"},
20 {"aeabi_feature_and_bits", 2, "Tag_Feature_GCS"}};
21 return TagsNamesMap;
22}
23
25 const llvm::AArch64AttributeParser &Attributes) {
26
28 auto GetPauthValue = [&Attributes](unsigned Tag) {
29 return Attributes.getAttributeValue("aeabi_pauthabi", Tag).value_or(0);
30 };
31 SubSections.Pauth.TagPlatform =
33 SubSections.Pauth.TagSchema =
35
36 auto GetFeatureValue = [&Attributes](unsigned Tag) {
37 return Attributes.getAttributeValue("aeabi_feature_and_bits", Tag)
38 .value_or(0);
39 };
40 SubSections.AndFeatures |=
42 SubSections.AndFeatures |=
44 SubSections.AndFeatures |=
46
47 return SubSections;
48}
AMDGPU Kernel Attributes
const std::vector< SubsectionAndTagToTagName > TagsNamesMap
LLVM_ABI AArch64BuildAttrSubsections extractBuildAttributesSubsections(const llvm::AArch64AttributeParser &)
struct llvm::AArch64BuildAttrSubsections::PauthSubSection Pauth