LLVM
24.0.0git
include
llvm
Support
AArch64MemoryHints.h
Go to the documentation of this file.
1
//===-- AArch64MemoryHints.h - AArch64 Memory Hint Attributes ---*- 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
#ifndef LLVM_SUPPORT_AARCH64MEMORYHINTS_H
10
#define LLVM_SUPPORT_AARCH64MEMORYHINTS_H
11
12
namespace
llvm
{
13
enum class
AArch64MemoryHint
{
14
HINT_NONE
= 0,
15
HINT_STSHH_KEEP
= 1,
16
HINT_STSHH_STRM
= 2,
17
};
18
19
template
<
typename
Int>
inline
bool
isValidAArch64MemoryHintValue
(
Int
I
) {
20
return
(
Int
)
AArch64MemoryHint::HINT_STSHH_KEEP
<=
I
&&
21
I
<= (
Int
)
AArch64MemoryHint::HINT_STSHH_STRM
;
22
}
23
24
template
<
typename
Int>
inline
AArch64MemoryHint
toAArch64MemoryHint
(
Int
I
) {
25
switch
(
I
) {
26
case
0:
27
return
AArch64MemoryHint::HINT_STSHH_KEEP
;
28
case
1:
29
return
AArch64MemoryHint::HINT_STSHH_STRM
;
30
default
:
31
return
AArch64MemoryHint::HINT_NONE
;
32
}
33
}
34
}
// namespace llvm
35
#endif
// LLVM_SUPPORT_AARCH64MEMORYHINTS_H
SelectTypeKind::Int
@ Int
Definition
AArch64ISelDAGToDAG.cpp:2098
I
#define I(x, y, z)
Definition
MD5.cpp:57
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
DefaultTargetInfo.h:21
llvm::isValidAArch64MemoryHintValue
bool isValidAArch64MemoryHintValue(Int I)
Definition
AArch64MemoryHints.h:19
llvm::AArch64MemoryHint
AArch64MemoryHint
Definition
AArch64MemoryHints.h:13
llvm::AArch64MemoryHint::HINT_STSHH_KEEP
@ HINT_STSHH_KEEP
Definition
AArch64MemoryHints.h:15
llvm::AArch64MemoryHint::HINT_STSHH_STRM
@ HINT_STSHH_STRM
Definition
AArch64MemoryHints.h:16
llvm::AArch64MemoryHint::HINT_NONE
@ HINT_NONE
Definition
AArch64MemoryHints.h:14
llvm::toAArch64MemoryHint
AArch64MemoryHint toAArch64MemoryHint(Int I)
Definition
AArch64MemoryHints.h:24
Generated on
for LLVM by
1.14.0