Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:29

0001 //== llvm/CodeGen/LowLevelTypeUtils.h -------------------------- -*- C++ -*-==//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 /// \file
0009 /// Implement a low-level type suitable for MachineInstr level instruction
0010 /// selection.
0011 ///
0012 /// This provides the CodeGen aspects of LowLevelType, such as Type conversion.
0013 ///
0014 //===----------------------------------------------------------------------===//
0015 
0016 #ifndef LLVM_CODEGEN_LOWLEVELTYPEUTILS_H
0017 #define LLVM_CODEGEN_LOWLEVELTYPEUTILS_H
0018 
0019 #include "llvm/CodeGen/ValueTypes.h"
0020 #include "llvm/CodeGenTypes/LowLevelType.h"
0021 
0022 namespace llvm {
0023 
0024 class DataLayout;
0025 class Type;
0026 struct fltSemantics;
0027 
0028 /// Construct a low-level type based on an LLVM type.
0029 LLT getLLTForType(Type &Ty, const DataLayout &DL);
0030 
0031 /// Get a rough equivalent of an MVT for a given LLT. MVT can't distinguish
0032 /// pointers, so these will convert to a plain integer.
0033 MVT getMVTForLLT(LLT Ty);
0034 EVT getApproximateEVTForLLT(LLT Ty, LLVMContext &Ctx);
0035 
0036 /// Get a rough equivalent of an LLT for a given MVT. LLT does not yet support
0037 /// scalarable vector types, and will assert if used.
0038 LLT getLLTForMVT(MVT Ty);
0039 
0040 /// Get the appropriate floating point arithmetic semantic based on the bit size
0041 /// of the given scalar LLT.
0042 const llvm::fltSemantics &getFltSemanticForLLT(LLT Ty);
0043 }
0044 
0045 #endif // LLVM_CODEGEN_LOWLEVELTYPEUTILS_H