LLVM
22.0.0git
include
llvm
CodeGen
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
19
#include "
llvm/CodeGen/ValueTypes.h
"
20
#include "
llvm/CodeGenTypes/LowLevelType.h
"
21
#include "
llvm/Support/Compiler.h
"
22
23
namespace
llvm
{
24
25
class
DataLayout
;
26
class
Type
;
27
struct
fltSemantics
;
28
29
/// Construct a low-level type based on an LLVM type.
30
LLVM_ABI
LLT
getLLTForType
(
Type
&Ty,
const
DataLayout
&
DL
);
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.
34
LLVM_ABI
MVT
getMVTForLLT
(
LLT
Ty);
35
LLVM_ABI
EVT
getApproximateEVTForLLT
(
LLT
Ty,
LLVMContext
&Ctx);
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.
39
LLVM_ABI
LLT
getLLTForMVT
(
MVT
Ty);
40
41
/// Get the appropriate floating point arithmetic semantic based on the bit size
42
/// of the given scalar LLT.
43
LLVM_ABI
const
llvm::fltSemantics
&
getFltSemanticForLLT
(
LLT
Ty);
44
}
45
46
#endif
// LLVM_CODEGEN_LOWLEVELTYPEUTILS_H
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition
ARMSLSHardening.cpp:73
Compiler.h
LLVM_ABI
#define LLVM_ABI
Definition
Compiler.h:213
LowLevelType.h
Implement a low-level type suitable for MachineInstr level instruction selection.
ValueTypes.h
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition
DataLayout.h:63
llvm::LLT
Definition
LowLevelType.h:40
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition
LLVMContext.h:68
llvm::MVT
Machine Value Type.
Definition
MachineValueType.h:36
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition
Type.h:45
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
llvm::getFltSemanticForLLT
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.
Definition
LowLevelTypeUtils.cpp:74
llvm::getMVTForLLT
LLVM_ABI MVT getMVTForLLT(LLT Ty)
Get a rough equivalent of an MVT for a given LLT.
Definition
LowLevelTypeUtils.cpp:48
llvm::getLLTForMVT
LLVM_ABI LLT getLLTForMVT(MVT Ty)
Get a rough equivalent of an LLT for a given MVT.
Definition
LowLevelTypeUtils.cpp:66
llvm::getApproximateEVTForLLT
LLVM_ABI EVT getApproximateEVTForLLT(LLT Ty, LLVMContext &Ctx)
Definition
LowLevelTypeUtils.cpp:57
llvm::getLLTForType
LLVM_ABI LLT getLLTForType(Type &Ty, const DataLayout &DL)
Construct a low-level type based on an LLVM type.
Definition
LowLevelTypeUtils.cpp:20
llvm::EVT
Extended Value Type.
Definition
ValueTypes.h:35
llvm::fltSemantics
Definition
APFloat.cpp:103
Generated on
for LLVM by
1.14.0