LLVM 22.0.0git
LowLevelTypeUtils.h
Go to the documentation of this file.
1//== llvm/CodeGen/LowLevelTypeUtils.h -------------------------- -*- 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/// Implement a low-level type suitable for MachineInstr level instruction
10/// selection.
11///
12/// This provides the CodeGen aspects of LowLevelType, such as Type conversion.
13///
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_CODEGEN_LOWLEVELTYPEUTILS_H
17#define LLVM_CODEGEN_LOWLEVELTYPEUTILS_H
18
22
23namespace llvm {
24
25class DataLayout;
26class Type;
27struct fltSemantics;
28
29/// Construct a low-level type based on an LLVM type.
31
32/// Get a rough equivalent of an MVT for a given LLT. MVT can't distinguish
33/// pointers, so these will convert to a plain integer.
36
37/// Get a rough equivalent of an LLT for a given MVT. LLT does not yet support
38/// scalarable vector types, and will assert if used.
40
41/// Get the appropriate floating point arithmetic semantic based on the bit size
42/// of the given scalar LLT.
44}
45
46#endif // LLVM_CODEGEN_LOWLEVELTYPEUTILS_H
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
#define LLVM_ABI
Definition Compiler.h:213
Implement a low-level type suitable for MachineInstr level instruction selection.
A parsed version of the target data layout string in and methods for querying it.
Definition DataLayout.h:63
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:68
Machine Value Type.
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:45
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI const llvm::fltSemantics & getFltSemanticForLLT(LLT Ty)
Get the appropriate floating point arithmetic semantic based on the bit size of the given scalar LLT.
LLVM_ABI MVT getMVTForLLT(LLT Ty)
Get a rough equivalent of an MVT for a given LLT.
LLVM_ABI LLT getLLTForMVT(MVT Ty)
Get a rough equivalent of an LLT for a given MVT.
LLVM_ABI EVT getApproximateEVTForLLT(LLT Ty, LLVMContext &Ctx)
LLVM_ABI LLT getLLTForType(Type &Ty, const DataLayout &DL)
Construct a low-level type based on an LLVM type.
Extended Value Type.
Definition ValueTypes.h:35