LLVM 20.0.0git
AArch64ImmCheck.h
Go to the documentation of this file.
1//===----- AArch64ImmCheck.h -- ARM immediate range check -----*- 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/// \file
9/// This file implements the ImmCheck class which supports the range-checking of
10/// immediate values supplied to AArch64 SVE/SME and NEON intrinsics.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef AARCH64_IMMCHECK_H
15#define AARCH64_IMMCHECK_H
16
17class ImmCheck {
18 int ImmArgIdx;
19 unsigned Kind;
20 unsigned ElementSizeInBits;
21 unsigned VecSizeInBits;
22
23public:
24 ImmCheck(int ImmArgIdx, unsigned Kind, unsigned ElementSizeInBits = 0,
25 unsigned VecSizeInBits = 128)
26 : ImmArgIdx(ImmArgIdx), Kind(Kind), ElementSizeInBits(ElementSizeInBits),
27 VecSizeInBits(VecSizeInBits) {}
28 ImmCheck(const ImmCheck &Other) = default;
29 ~ImmCheck() = default;
30
31 int getImmArgIdx() const { return ImmArgIdx; }
32 unsigned getKind() const { return Kind; }
33 unsigned getElementSizeInBits() const { return ElementSizeInBits; }
34 unsigned getVecSizeInBits() const { return VecSizeInBits; }
35};
36
37#endif
std::optional< std::vector< StOtherPiece > > Other
Definition: ELFYAML.cpp:1313
ImmCheck(int ImmArgIdx, unsigned Kind, unsigned ElementSizeInBits=0, unsigned VecSizeInBits=128)
unsigned getElementSizeInBits() const
int getImmArgIdx() const
unsigned getVecSizeInBits() const
unsigned getKind() const
ImmCheck(const ImmCheck &Other)=default
~ImmCheck()=default