LLVM 24.0.0git
MachineValueType.cpp
Go to the documentation of this file.
1//===- MachineValueType.cpp - Machine-Level types ---------------*- 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
10
11using namespace llvm;
12
13static constexpr MVT::VecVTTable buildVecVTTable() {
15 uint8_t NextSlot = 1;
16#define GET_VT_ATTR(Ty, Sz, Any, Int, FP, Vec, Sc, Tup, NF, NElem, EltTy) \
17 if (Vec && !Tup && !T.Slots[NElem]) \
18 T.Slots[NElem] = NextSlot++;
19#include "llvm/CodeGen/GenVT.inc"
20#undef GET_VT_ATTR
21#define GET_VT_ATTR(Ty, Sz, Any, Int, FP, Vec, Sc, Tup, NF, NElem, EltTy) \
22 if (Vec && !Tup) \
23 T.Tys[Sc][MVT::EltTy][T.Slots[NElem]] = MVT::Ty;
24#include "llvm/CodeGen/GenVT.inc"
25#undef GET_VT_ATTR
26 return T;
27}
28
static constexpr MVT::VecVTTable buildVecVTTable()
#define T
static LLVM_ABI const VecVTTable VecVTs
This is an optimization pass for GlobalISel generic memory operations.
Lookup table for getVectorVT.