16#ifndef LLVM_IR_IRUNITREF_H
17#define LLVM_IR_IRUNITREF_H
61 template <
typename To,
typename From,
typename Enable>
friend struct CastInfo;
73 template <typename IRUnitT, IRUnitKind K = IRUnitKindTraits<IRUnitT>::Kind>
77static_assert(!std::is_constructible_v<IRUnitRef, std::nullptr_t>,
78 "IRUnitRef must not be constructible from nullptr");
88 return static_cast<const To *
>(
IR.getPointer());
Value * getPointer(Value *Ptr)
Legalize the Machine IR a function s Machine IR
A type-erased reference to the IR unit a pass or analysis is running on, together with the kind of IR...
IRUnitRef(const IRUnitT &IR)
Represents a single loop in the control flow graph.
A Module instance is used to store all the information related to an LLVM module.
This is an optimization pass for GlobalISel generic memory operations.
IRUnitKind
The IR units a pass can run on.
static const To * doCastIfPossible(IRUnitRef IR)
static bool isPossible(IRUnitRef IR)
static const To * castFailed()
static const To * doCast(IRUnitRef IR)
This struct provides a method for customizing the way a cast is performed.
static CastReturnType castFailed()
static CastReturnType doCast(const From &f)
static bool isPossible(const From &f)
static constexpr IRUnitKind Kind
static constexpr IRUnitKind Kind
static constexpr IRUnitKind Kind
static constexpr IRUnitKind Kind
Map an IR unit type to its IRUnitKind.