LLVM 20.0.0git
|
#include "llvm/CodeGen/GlobalISel/Utils.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/CodeGenCommonISel.h"
#include "llvm/CodeGen/GlobalISel/GISelChangeObserver.h"
#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
#include "llvm/CodeGen/GlobalISel/GenericMachineInstrs.h"
#include "llvm/CodeGen/GlobalISel/LostDebugLocObserver.h"
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/MachineSizeOpts.h"
#include "llvm/CodeGen/RegisterBankInfo.h"
#include "llvm/CodeGen/StackProtector.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/SizeOpts.h"
#include <numeric>
#include <optional>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "globalisel-utils" |
bool canCreatePoison | ( | Register | Reg, |
const MachineRegisterInfo & | MRI, | ||
bool | ConsiderFlagsAndMetadata = true |
||
) |
Definition at line 1933 of file Utils.cpp.
References MRI, and PoisonOnly.
|
static |
Definition at line 1776 of file Utils.cpp.
References llvm::LLT::getElementCount(), llvm::getIConstantVRegValWithLookThrough(), llvm::GExtractVectorElement::getIndexReg(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::GShuffleVector::getMask(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::GExtractVectorElement::getVectorReg(), includesPoison(), llvm::is_contained(), MRI, and shiftAmountKnownInRange().
Referenced by isGuaranteedNotToBeUndefOrPoison().
|
static |
Definition at line 1768 of file Utils.cpp.
References PoisonOnly.
Referenced by canCreateUndefOrPoison().
|
static |
Definition at line 1772 of file Utils.cpp.
References UndefOnly.
Referenced by isGuaranteedNotToBeUndefOrPoison().
Definition at line 1320 of file Utils.cpp.
Referenced by llvm::getVectorSplat(), and llvm::isConstantOrConstantVector().
|
static |
Definition at line 1451 of file Utils.cpp.
References MI.
Referenced by llvm::isConstantOrConstantVector().
|
static |
Definition at line 1878 of file Utils.cpp.
References llvm::all_of(), canCreateUndefOrPoison(), llvm::Depth, llvm::GMergeLikeInstr::getNumSources(), llvm::MachineInstr::getOpcode(), llvm::GMergeLikeInstr::getSourceReg(), I, includesUndef(), isGuaranteedNotToBeUndefOrPoison(), llvm::MaxAnalysisRecursionDepth, MRI, and llvm::MachineInstr::uses().
Referenced by isGuaranteedNotToBeUndefOrPoison().
|
static |
Definition at line 235 of file Utils.cpp.
References llvm::DS_Error, llvm::MachineFunction::getName(), llvm::TargetPassConfig::isGlobalISelAbortEnabled(), MORE, and llvm::report_fatal_error().
Referenced by llvm::reportGISelFailure(), and llvm::reportGISelWarning().
|
static |
Shifts return poison if shiftwidth is larger than the bitwidth.
Definition at line 1728 of file Utils.cpp.
References llvm::getIConstantVRegValWithLookThrough(), llvm::GMergeLikeInstr::getNumSources(), llvm::LLT::getScalarSizeInBits(), llvm::GMergeLikeInstr::getSourceReg(), I, llvm::LLT::isScalableVector(), llvm::LLT::isScalar(), and MRI.
Referenced by canCreateUndefOrPoison().