llvm::getTypeForLLT

Get the type back from LLT. It won't be 100 percent accurate but returns an estimate of the type.

Synopsis

Declared in <llvm/CodeGen/GlobalISel/Utils.h>

Type*
getTypeForLLT(
    LLT Ty,
    LLVMContext& C);

Return Value

The instances of the Type class are immutable: once they are created, they are never changed. Also note that only one instance of a particular type is ever created. Thus seeing if two types are equal is a matter of doing a trivial pointer comparison. To enforce that no two equal instances are created, Type instances can only be created via static factory methods in class Type and in derived classes. Once allocated, Types are never free'd.

Parameters

NameDescription
CThis is an important class for using LLVM in a threaded context. It (opaquely) owns and manages the core "global" data of LLVM's core infrastructure, including the type and constant uniquing tables. LLVMContext itself provides no locking guarantees, so you should be careful to have one context per thread.