LLVM 23.0.0git
LowLevelType.h File Reference

Implement a low-level type suitable for MachineInstr level instruction selection. More...

Go to the source code of this file.

Classes

class  llvm::LLT
struct  llvm::DenseMapInfo< LLT >

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Functions

raw_ostreamllvm::operator<< (raw_ostream &OS, const LLT &Ty)

Detailed Description

Implement a low-level type suitable for MachineInstr level instruction selection.

For a type attached to a MachineInstr, we care about total size, the number of vector lanes (if any) and the kind of the type (anyscalar, integer, float and etc). Floating point are filled with APFloat::Semantics to make them distinguishable.

Earlier other information required for correct selection was expected to be carried only by the opcode, or non-type flags. For example the distinction between G_ADD and G_FADD for int/float or fast-math flags.

Now we also able to rely on the kind of the type. This may be useful to distinguish different types of the same size used at the same opcode, for example, G_FADD with half vs G_FADD with bfloat16.

Definition in file LowLevelType.h.