//== llvm/CodeGenTypes/LowLevelType.h -------------------------- -*- C++ -*-==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// \file /// Implement a low-level type suitable for MachineInstr level instruction /// selection. /// /// For a type attached to a MachineInstr, we only care about 2 details: total /// size and the number of vector lanes (if any). Accordingly, there are 4 /// possible valid type-kinds: /// /// * `sN` for scalars and aggregates /// * `<N x sM>` for vectors, which must have at least 2 elements. /// * `pN` for pointers /// /// Other information required for correct selection is expected to be carried /// by the opcode, or non-type flags. For example the distinction between G_ADD /// and G_FADD for int/float or fast-math flags. /// //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_LOWLEVELTYPE_H #define LLVM_CODEGEN_LOWLEVELTYPE_H #include "llvm/ADT/DenseMapInfo.h" #include "llvm/CodeGenTypes/MachineValueType.h" #include "llvm/Support/Debug.h" #include <cassert> namespace llvm { class Type; class raw_ostream; class LLT { … }; inline raw_ostream& operator<<(raw_ostream &OS, const LLT &Ty) { … } template<> struct DenseMapInfo<LLT> { … }; } #endif // LLVM_CODEGEN_LOWLEVELTYPE_H