LLVM 24.0.0git
PISADefines.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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/// \file
10/// This file declares definitions shared across the PISA backend.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_PISA_PISADEFINES_H
15#define LLVM_LIB_TARGET_PISA_PISADEFINES_H
16
17#include "llvm/ADT/ArrayRef.h"
18#include "llvm/ADT/StringRef.h"
19#include <cstdint>
20
21namespace llvm {
22namespace PISA {
23
24enum class Swizzle : unsigned { X, Y, Z, W, XYZW, XY, ZW, NONE };
25constexpr unsigned SimdSize = 32;
26
27// Keep these in sync with PISAInstrInfo.td!
28// Enumerator names preserve the spelling of PISA cache-control modifiers.
29enum class LdCacheCtrl : unsigned {
31 L1c = 1,
32 L1uc = 2,
33 L1s = 3,
34 L2c = 4,
35 L2uc = 5,
36 L3c = 6,
37 L3uc = 7,
38 ri = 8
39};
40
41enum class StCacheCtrl : unsigned {
43 L1uc = 1,
44 L1wb = 2,
45 L1wt = 3,
46 L1s = 4,
47 L2uc = 5,
48 L2wb = 6,
49 L3uc = 7,
50 L3wb = 8
51};
52
53enum class AtomCacheCtrl : unsigned { Default = 0, uc = 2, L2wb = 4, L3wb = 3 };
54
55} // namespace PISA
56} // namespace llvm
57
58#endif // LLVM_LIB_TARGET_PISA_PISADEFINES_H
constexpr unsigned SimdSize
Definition PISADefines.h:25
This is an optimization pass for GlobalISel generic memory operations.