1 //== llvm/CodeGen/LowLevelType.h ------------------------------- -*- C++ -*-==//
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
7 //===----------------------------------------------------------------------===//
9 /// Implement a low-level type suitable for MachineInstr level instruction
12 /// This provides the CodeGen aspects of LowLevelType, such as Type conversion.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_CODEGEN_LOWLEVELTYPE_H
17 #define LLVM_CODEGEN_LOWLEVELTYPE_H
19 #include "llvm/Support/LowLevelTypeImpl.h"
20 #include "llvm/Support/MachineValueType.h"
27 /// Construct a low-level type based on an LLVM type.
28 LLT getLLTForType(Type &Ty, const DataLayout &DL);
30 /// Get a rough equivalent of an MVT for a given LLT. MVT can't distinguish
31 /// pointers, so these will convert to a plain integer.
32 MVT getMVTForLLT(LLT Ty);
34 /// Get a rough equivalent of an LLT for a given MVT. LLT does not yet support
35 /// scalarable vector types, and will assert if used.
36 LLT getLLTForMVT(MVT Ty);
40 #endif // LLVM_CODEGEN_LOWLEVELTYPE_H