LLVM  13.0.0git
LowLevelType.h
Go to the documentation of this file.
1 //== llvm/CodeGen/LowLevelType.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_LOWLEVELTYPE_H
17 #define LLVM_CODEGEN_LOWLEVELTYPE_H
18 
21 
22 namespace llvm {
23 
24 class DataLayout;
25 class Type;
26 struct fltSemantics;
27 
28 /// Construct a low-level type based on an LLVM type.
29 LLT getLLTForType(Type &Ty, const DataLayout &DL);
30 
31 /// Get a rough equivalent of an MVT for a given LLT. MVT can't distinguish
32 /// pointers, so these will convert to a plain integer.
33 MVT getMVTForLLT(LLT Ty);
34 
35 /// Get a rough equivalent of an LLT for a given MVT. LLT does not yet support
36 /// scalarable vector types, and will assert if used.
37 LLT getLLTForMVT(MVT Ty);
38 
39 /// Get the appropriate floating point arithmetic semantic based on the bit size
40 /// of the given scalar LLT.
42 }
43 
44 #endif // LLVM_CODEGEN_LOWLEVELTYPE_H
llvm
Definition: AllocatorList.h:23
llvm::getFltSemanticForLLT
const llvm::fltSemantics & getFltSemanticForLLT(LLT Ty)
Get the appropriate floating point arithmetic semantic based on the bit size of the given scalar LLT.
Definition: LowLevelType.cpp:63
MachineValueType.h
llvm::getLLTForType
LLT getLLTForType(Type &Ty, const DataLayout &DL)
Construct a low-level type based on an LLVM type.
Definition: LowLevelType.cpp:21
llvm::getLLTForMVT
LLT getLLTForMVT(MVT Ty)
Get a rough equivalent of an LLT for a given MVT.
Definition: LowLevelType.cpp:55
LowLevelTypeImpl.h
TemplateParamKind::Type
@ Type
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::fltSemantics
Definition: APFloat.cpp:54
llvm::getMVTForLLT
MVT getMVTForLLT(LLT Ty)
Get a rough equivalent of an MVT for a given LLT.
Definition: LowLevelType.cpp:46