clang 24.0.0git
TargetUtils.h
Go to the documentation of this file.
1//===--- TargetUtils.h - Shared target-specific AST queries -----*- 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 holds the target-specific AST queries that both classic CodeGen
10// and CIR CodeGen need.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_CODEGENUTILS_TARGETUTILS_H
15#define LLVM_CLANG_CODEGENUTILS_TARGETUTILS_H
16
18
19#include <cstdint>
20
21namespace clang {
22class Decl;
23class FunctionDecl;
24} // namespace clang
25
26namespace clang::CodeGenUtils {
27
28//===----------------------------------------------------------------------===//
29// Arm and AArch64
30//===----------------------------------------------------------------------===//
31
32/// The Arm SME ABI issues that can prevent inlining one function into another.
45
46/// Determines if there are any Arm SME ABI issues with inlining \p Callee into
47/// \p Caller. Returns the issue (if any) in the ArmSMEInlinability bit enum.
49 const FunctionDecl *Callee);
50
51/// Returns whether the Neon builtin \p BuiltinID takes a trailing argument
52/// that discriminates the operand type. This should be kept consistent with
53/// the logic in Sema.
54/// TODO: Make this return false for SISD builtins.
55bool hasExtraNeonArgument(unsigned BuiltinID);
56
57//===----------------------------------------------------------------------===//
58// AMDGPU
59//===----------------------------------------------------------------------===//
60
61/// Returns whether \p D must be given protected visibility on AMDGPU.
62/// \p HasHiddenVisibility is whether the emitted global currently has hidden
63/// visibility.
64bool requiresAMDGPUProtectedVisibility(const Decl *D, bool HasHiddenVisibility);
65
66} // namespace clang::CodeGenUtils
67
68#endif // LLVM_CLANG_CODEGENUTILS_TARGETUTILS_H
Provides LLVM's BitmaskEnum facility to enumeration types declared in namespace clang.
Decl - This represents one declaration (or definition), e.g.
Definition DeclBase.h:86
Represents a function declaration or definition.
Definition Decl.h:2059
bool requiresAMDGPUProtectedVisibility(const Decl *D, bool HasHiddenVisibility)
Returns whether D must be given protected visibility on AMDGPU.
bool hasExtraNeonArgument(unsigned BuiltinID)
Returns whether the Neon builtin BuiltinID takes a trailing argument that discriminates the operand t...
ArmSMEInlinability
The Arm SME ABI issues that can prevent inlining one function into another.
Definition TargetUtils.h:33
ArmSMEInlinability getArmSMEInlinability(const FunctionDecl *Caller, const FunctionDecl *Callee)
Determines if there are any Arm SME ABI issues with inlining Callee into Caller.
Top level wrappers for InstallAPI frontend operations.
int32_t uint32_t uint32_t __packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 __packed_splat2 uint8_t