LLVM 22.0.0git
Utils.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "globalisel-utils"

Functions

static void reportGISelDiagnostic (DiagnosticSeverity Severity, MachineFunction &MF, const TargetPassConfig &TPC, MachineOptimizationRemarkEmitter &MORE, MachineOptimizationRemarkMissed &R)
static bool isBuildVectorOp (unsigned Opcode)
static bool isConstantScalar (const MachineInstr &MI, const MachineRegisterInfo &MRI, bool AllowFP=true, bool AllowOpaqueConstants=true)
static bool shiftAmountKnownInRange (Register ShiftAmount, const MachineRegisterInfo &MRI)
 Shifts return poison if shiftwidth is larger than the bitwidth.
static bool includesPoison (UndefPoisonKind Kind)
static bool includesUndef (UndefPoisonKind Kind)
static bool canCreateUndefOrPoison (Register Reg, const MachineRegisterInfo &MRI, bool ConsiderFlagsAndMetadata, UndefPoisonKind Kind)
static bool isGuaranteedNotToBeUndefOrPoison (Register Reg, const MachineRegisterInfo &MRI, unsigned Depth, UndefPoisonKind Kind)
bool canCreatePoison (Register Reg, const MachineRegisterInfo &MRI, bool ConsiderFlagsAndMetadata=true)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "globalisel-utils"

Definition at line 41 of file Utils.cpp.

Function Documentation

◆ canCreatePoison()

bool canCreatePoison ( Register Reg,
const MachineRegisterInfo & MRI,
bool ConsiderFlagsAndMetadata = true )

Definition at line 2006 of file Utils.cpp.

References MRI, PoisonOnly, and Reg.

◆ canCreateUndefOrPoison()

◆ includesPoison()

bool includesPoison ( UndefPoisonKind Kind)
static

Definition at line 1839 of file Utils.cpp.

References PoisonOnly.

Referenced by canCreateUndefOrPoison().

◆ includesUndef()

bool includesUndef ( UndefPoisonKind Kind)
static

Definition at line 1843 of file Utils.cpp.

References UndefOnly.

Referenced by isGuaranteedNotToBeUndefOrPoison().

◆ isBuildVectorOp()

bool isBuildVectorOp ( unsigned Opcode)
static

Definition at line 1352 of file Utils.cpp.

Referenced by llvm::getVectorSplat(), and llvm::isConstantOrConstantVector().

◆ isConstantScalar()

bool isConstantScalar ( const MachineInstr & MI,
const MachineRegisterInfo & MRI,
bool AllowFP = true,
bool AllowOpaqueConstants = true )
static

Definition at line 1508 of file Utils.cpp.

References MI, and MRI.

Referenced by llvm::isConstantOrConstantVector().

◆ isGuaranteedNotToBeUndefOrPoison()

◆ reportGISelDiagnostic()

◆ shiftAmountKnownInRange()

bool shiftAmountKnownInRange ( Register ShiftAmount,
const MachineRegisterInfo & MRI )
static

Shifts return poison if shiftwidth is larger than the bitwidth.

Definition at line 1799 of file Utils.cpp.

References llvm::getIConstantVRegValWithLookThrough(), llvm::GMergeLikeInstr::getNumSources(), llvm::getOpcodeDef(), llvm::GMergeLikeInstr::getSourceReg(), I, and MRI.

Referenced by canCreateUndefOrPoison().