LLVM 20.0.0git
|
#include "llvm/IR/Value.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/DerivedUser.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/TypedPointerType.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include "llvm/IR/Value.def"
#include "llvm/IR/Instruction.def"
Go to the source code of this file.
Macros | |
#define | HANDLE_VALUE(Name) |
#define | HANDLE_MEMORY_VALUE(Name) |
#define | HANDLE_CONSTANT(Name) |
#define | HANDLE_INSTRUCTION(Name) /* nothing */ |
#define | HANDLE_INST(N, OPC, CLASS) |
#define | HANDLE_USER_INST(N, OPC, CLASS) |
Functions | |
static Type * | checkType (Type *Ty) |
static bool | isUnDroppableUser (const User *U) |
static bool | getSymTab (Value *V, ValueSymbolTable *&ST) |
static bool | contains (SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C) |
static bool | contains (Value *Expr, Value *V) |
static void | replaceDbgUsesOutsideBlock (Value *V, Value *New, BasicBlock *BB) |
Replace llvm.dbg. | |
static std::optional< int64_t > | getOffsetFromIndex (const GEPOperator *GEP, unsigned Idx, const DataLayout &DL) |
Variables | |
static cl::opt< unsigned > | UseDerefAtPointSemantics ("use-dereferenceable-at-point-semantics", cl::Hidden, cl::init(false), cl::desc("Deref attributes and metadata infer facts at definition only")) |
#define HANDLE_CONSTANT | ( | Name | ) |
#define HANDLE_INST | ( | N, | |
OPC, | |||
CLASS | |||
) |
#define HANDLE_INSTRUCTION | ( | Name | ) | /* nothing */ |
#define HANDLE_MEMORY_VALUE | ( | Name | ) |
#define HANDLE_USER_INST | ( | N, | |
OPC, | |||
CLASS | |||
) |
#define HANDLE_VALUE | ( | Name | ) |
Definition at line 46 of file Value.cpp.
References assert(), and llvm::Type::getScalarType().
|
static |
Definition at line 469 of file Value.cpp.
References llvm::CallingConv::C, contains(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::User::operands().
Referenced by llvm::X86Operand::addGR16orGR32orGR64Operands(), llvm::X86Operand::addGR32orGR64Operands(), analyzeCompressibleUses(), llvm::PPCFrameLowering::assignCalleeSavedSpillSlots(), llvm::SystemZELFFrameLowering::assignCalleeSavedSpillSlots(), llvm::X86FrameLowering::assignCalleeSavedSpillSlots(), llvm::ARMBaseInstrInfo::breakPartialRegDependency(), llvm::X86InstrInfo::breakPartialRegDependency(), llvm::X86InstrInfo::buildClearRegister(), canBeFeederToNewValueJump(), canSpillOnFrameIndexAccess(), CheckBaseRegAndIndexRegAndScale(), llvm::IRSimilarity::IRSimilarityCandidate::compareAssignmentMapping(), computeCalleeSaveRegisterPairs(), llvm::RegionBase< RegionTraits< MachineFunction > >::contains(), llvm::RegionBase< Tr >::contains(), llvm::BaseIndexOffset::contains(), contains(), llvm::ARCInstrInfo::copyPhysReg(), llvm::AArch64InstrInfo::copyPhysReg(), llvm::ARMBaseInstrInfo::copyPhysReg(), llvm::Thumb1InstrInfo::copyPhysReg(), llvm::Thumb2InstrInfo::copyPhysReg(), llvm::BPFInstrInfo::copyPhysReg(), llvm::HexagonInstrInfo::copyPhysReg(), llvm::MSP430InstrInfo::copyPhysReg(), llvm::PPCInstrInfo::copyPhysReg(), llvm::SparcInstrInfo::copyPhysReg(), llvm::VEInstrInfo::copyPhysReg(), llvm::SystemZInstrInfo::copyPhysReg(), llvm::XtensaInstrInfo::copyPhysReg(), llvm::LoongArchInstrInfo::copyPhysReg(), llvm::RISCVInstrInfo::copyPhysReg(), llvm::R600InstrInfo::copyPhysReg(), llvm::SIInstrInfo::copyPhysReg(), llvm::AVRInstrInfo::copyPhysReg(), llvm::CSKYInstrInfo::copyPhysReg(), llvm::M68kInstrInfo::copyPhysReg(), llvm::Mips16InstrInfo::copyPhysReg(), llvm::MipsSEInstrInfo::copyPhysReg(), llvm::X86InstrInfo::copyPhysReg(), llvm::LanaiInstrInfo::copyPhysReg(), CopyToFromAsymmetricReg(), llvm::StringMap< ValueTy, AllocatorTy >::count(), llvm::X86InstrInfo::describeLoadedValue(), llvm::AArch64FrameLowering::determineCalleeSaves(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::CSKYFrameLowering::determineCalleeSaves(), llvm::SystemZELFFrameLowering::determineCalleeSaves(), llvm::ARCRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), emitLoad(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::SystemZELFFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), emitStore(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), llvm::PPCInstrInfo::expandPostRAPseudo(), llvm::R600InstrInfo::fitsConstReadLimitations(), flattenCommandLine(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::ARMAsmBackendDarwin::generateCompactUnwindEncoding(), llvm::RegionBase< Tr >::getBBNode(), llvm::HexagonInstrInfo::getCompoundCandidateGroup(), llvm::GenericCycle< ContextT >::getCyclePredecessor(), llvm::HexagonInstrInfo::getDuplexCandidateGroup(), llvm::RegionBase< Tr >::getEnteringBlock(), llvm::LoopBase< BlockT, LoopT >::getExitBlocks(), llvm::GenericCycle< ContextT >::getExitBlocks(), llvm::LoopBase< BlockT, LoopT >::getExitEdges(), llvm::RegionBase< Tr >::getExitingBlock(), llvm::LoopBase< BlockT, LoopT >::getExitingBlock(), llvm::LoopBase< BlockT, LoopT >::getExitingBlocks(), llvm::RegionBase< Tr >::getExitingBlocks(), llvm::GenericCycle< ContextT >::getExitingBlocks(), llvm::gsym::GsymReader::getFunctionInfoDataForAddress(), getHexagonRegisterPair(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::LoopBase< BlockT, LoopT >::getLoopPredecessor(), getMFHiLoOpc(), getNextRegister(), llvm::RegionBase< Tr >::getNode(), getPairedGPR(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), getRC32(), llvm::RISCVRegisterInfo::getRegAllocationHints(), getRegClassFromGRPhysReg(), getRegImmPairPreventingCompression(), llvm::SystemZELFFrameLowering::getRegSpillOffset(), llvm::RegionBase< Tr >::getSubRegionNode(), getSVECalleeSaveSlotRange(), llvm::LoopBase< BlockT, LoopT >::hasDedicatedExits(), indirectCopyToAGPR(), INITIALIZE_PASS(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::SITargetLowering::insertCopiesSplitCSR(), isEvenReg(), llvm::ErrataWorkaround::isFloat(), llvm::AArch64InstrInfo::isGPRCopy(), llvm::AArch64InstrInfo::isHForm(), llvm::SystemZ::isHighReg(), llvm::X86Operand::isMem512_GR16(), llvm::X86Operand::isMem512_GR32(), llvm::X86Operand::isMem512_GR64(), llvm::AArch64InstrInfo::isQForm(), llvm::SPIRV::lookupBuiltinNameHelper(), llvm::SITargetLowering::LowerFormalArguments(), llvm::SITargetLowering::LowerReturn(), lowerRISCVVMachineInstrToMCInst(), mapArgRegToOffsetAIX(), llvm::RISCVRegisterInfo::needsFrameBaseReg(), nextReg(), llvm::RegionBase< Tr >::outermostLoopInRegion(), llvm::RISCVISAInfo::parseArchString(), printAsmMRegister(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), printAsmVRegister(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printSavedRegsBitmask(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), llvm::R600InstrInfo::readsLDSSrcReg(), llvm::AArch64RegisterInfo::regNeedsCFI(), llvm::Value::replaceUsesOutsideBlock(), llvm::SystemZELFFrameLowering::restoreCalleeSavedRegisters(), llvm::SystemZXPLINKFrameLowering::restoreCalleeSavedRegisters(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::X86MachineFunctionInfo::setRestoreBasePointer(), llvm::SystemZELFFrameLowering::spillCalleeSavedRegisters(), llvm::SystemZXPLINKFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), splitLowAndHighRegs(), llvm::AVRRegisterInfo::splitReg(), llvm::PPCFrameLowering::updateCalleeSaves(), llvm::GenericCycle< ContextT >::verifyCycle(), llvm::GenericCycle< ContextT >::verifyCycleNest(), and llvm::Function::viewCFG().
Definition at line 486 of file Value.cpp.
References llvm::CallingConv::C, and contains().
|
static |
Definition at line 996 of file Value.cpp.
References DL, GEP, llvm::gep_type_begin(), llvm::generic_gep_type_iterator< ItTy >::getSequentialElementStride(), llvm::ConstantInt::getSExtValue(), llvm::generic_gep_type_iterator< ItTy >::getStructTypeOrNull(), llvm::ConstantInt::getZExtValue(), Idx, llvm::ConstantInt::isZero(), llvm::Offset, and Size.
Referenced by llvm::Value::getPointerOffsetFrom().
|
static |
Definition at line 259 of file Value.cpp.
References A, assert(), I, and P.
Referenced by llvm::SymbolTableListTraits< ValueSubClass, Args >::addNodeToList(), llvm::SymbolTableListTraits< ValueSubClass, Args >::removeNodeFromList(), llvm::SymbolTableListTraits< ValueSubClass, Args >::setSymTabObject(), and llvm::Value::takeName().
Definition at line 165 of file Value.cpp.
Referenced by llvm::Value::hasNUndroppableUses(), and llvm::Value::hasNUndroppableUsesOrMore().
|
static |
Replace llvm.dbg.
Definition at line 575 of file Value.cpp.
References llvm::findDbgUsers(), and llvm::DbgMarker::getParent().
Referenced by llvm::Value::replaceUsesOutsideBlock().
|
static |
Referenced by llvm::Value::getPointerDereferenceableBytes().