LLVM  8.0.1
Classes | Namespaces | Macros | Functions
Verifier.cpp File Reference
#include "llvm/IR/Verifier.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/ilist.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Comdat.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSlotTracker.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Statepoint.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include "llvm/IR/Metadata.def"

Go to the source code of this file.

Classes

struct  llvm::VerifierSupport
 

Namespaces

 llvm
 This class represents lattice values for constants.
 

Macros

#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS)   void visit##CLASS(const CLASS &N);
 
#define Assert(C, ...)   do { if (!(C)) { CheckFailed(__VA_ARGS__); return; } } while (false)
 We know that cond should be true, if not print an error message. More...
 
#define AssertDI(C, ...)   do { if (!(C)) { DebugInfoCheckFailed(__VA_ARGS__); return; } } while (false)
 We know that a debug info condition should be true, if not print an error message. More...
 
#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS)
 
#define AssertTBAA(C, ...)
 

Functions

static void forEachUser (const Value *User, SmallPtrSet< const Value *, 32 > &Visited, llvm::function_ref< bool(const Value *)> Callback)
 
static bool isType (const Metadata *MD)
 
static bool isScope (const Metadata *MD)
 
static bool isDINode (const Metadata *MD)
 
static bool hasConflictingReferenceFlags (unsigned Flags)
 Detect mutually exclusive flags. More...
 
static bool isFuncOnlyAttr (Attribute::AttrKind Kind)
 Return true if this attribute kind only applies to functions. More...
 
static bool isFuncOrArgAttr (Attribute::AttrKind Kind)
 Return true if this is a function attribute that can also appear on arguments. More...
 
static InstructiongetSuccPad (Instruction *Terminator)
 
static bool isTypeCongruent (Type *L, Type *R)
 Two types are "congruent" if they are identical, or if they are both pointer types with different pointee types and the same address space. More...
 
static AttrBuilder getParameterABIAttributes (int I, AttributeList Attrs)
 
static bool isContiguous (const ConstantRange &A, const ConstantRange &B)
 
static ValuegetParentPad (Value *EHPad)
 
static DISubprogramgetSubprogram (Metadata *LocalScope)
 Carefully grab the subprogram from a local scope. More...
 
static bool IsRootTBAANode (const MDNode *MD)
 
static bool IsScalarTBAANodeImpl (const MDNode *MD, SmallPtrSetImpl< const MDNode *> &Visited)
 
static bool isNewFormatTBAATypeNode (llvm::MDNode *Type)
 

Macro Definition Documentation

◆ Assert

#define Assert (   C,
  ... 
)    do { if (!(C)) { CheckFailed(__VA_ARGS__); return; } } while (false)

We know that cond should be true, if not print an error message.

Definition at line 533 of file Verifier.cpp.

Referenced by forEachUser(), getParameterABIAttributes(), getParentPad(), getSubprogram(), getSuccPad(), isContiguous(), and isFuncOrArgAttr().

◆ AssertDI

#define AssertDI (   C,
  ... 
)    do { if (!(C)) { DebugInfoCheckFailed(__VA_ARGS__); return; } } while (false)

We know that a debug info condition should be true, if not print an error message.

Definition at line 538 of file Verifier.cpp.

Referenced by forEachUser(), getParentPad(), getSubprogram(), getSuccPad(), hasConflictingReferenceFlags(), and isDINode().

◆ AssertTBAA

#define AssertTBAA (   C,
  ... 
)
Value:
do { \
if (!(C)) { \
CheckFailed(__VA_ARGS__); \
return false; \
} \
} while (false)
uint64_t CallInst * C

Definition at line 4893 of file Verifier.cpp.

Referenced by llvm::TBAAVerifier::visitTBAAMetadata().

◆ HANDLE_SPECIALIZED_MDNODE_LEAF [1/2]

#define HANDLE_SPECIALIZED_MDNODE_LEAF (   CLASS)    void visit##CLASS(const CLASS &N);

Definition at line 422 of file Verifier.cpp.

◆ HANDLE_SPECIALIZED_MDNODE_LEAF [2/2]

#define HANDLE_SPECIALIZED_MDNODE_LEAF (   CLASS)
Value:
case Metadata::CLASS##Kind: \
visit##CLASS(cast<CLASS>(MD)); \
break;
const unsigned Kind

Definition at line 422 of file Verifier.cpp.

Function Documentation

◆ forEachUser()

static void forEachUser ( const Value User,
SmallPtrSet< const Value *, 32 > &  Visited,
llvm::function_ref< bool(const Value *)>  Callback 
)
static

Definition at line 550 of file Verifier.cpp.

References A, assert(), Assert, AssertDI, C, llvm::VerifierSupport::CheckFailed(), llvm::VerifierSupport::Context, llvm::VerifierSupport::DL, llvm::dyn_cast(), F(), llvm::FunctionType::get(), llvm::GlobalAlias::getAliasee(), llvm::GlobalValue::getAlignment(), llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getLinkage(), llvm::GlobalObject::getMetadata(), llvm::MetadataAsValue::getMetadata(), llvm::Metadata::getMetadataID(), llvm::Value::getName(), llvm::NamedMDNode::getName(), llvm::StructType::getNumElements(), llvm::GlobalValue::getParent(), llvm::DataLayout::getProgramAddressSpace(), llvm::Value::getType(), llvm::GlobalValue::getType(), llvm::CompositeType::getTypeAtIndex(), llvm::ValueAsMetadata::getValue(), llvm::GlobalValue::getValueType(), llvm::Type::getVoidTy(), llvm::GlobalValue::hasAppendingLinkage(), llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalObject::hasComdat(), llvm::GlobalValue::hasComdat(), llvm::GlobalValue::hasCommonLinkage(), llvm::GlobalValue::hasDefaultVisibility(), llvm::GlobalValue::hasDLLImportStorageClass(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalValue::hasExternalWeakLinkage(), llvm::GlobalVariable::hasInitializer(), llvm::GlobalValue::hasLocalLinkage(), llvm::Value::hasName(), llvm::GlobalValue::hasValidDeclarationLinkage(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::Type::isArrayTy(), llvm::GlobalVariable::isConstant(), llvm::GlobalValue::isDeclaration(), llvm::GlobalValue::isDeclarationForLinker(), llvm::GlobalValue::isDSOLocal(), llvm::Type::isIntegerTy(), llvm::Type::isMetadataTy(), llvm::Constant::isNullValue(), llvm::Type::isPointerTy(), llvm::MDNode::isResolved(), llvm::MDNode::isTemporary(), llvm::GlobalAlias::isValidLinkage(), llvm_unreachable, llvm::VerifierSupport::M, llvm::Value::materialized_users(), llvm::Value::MaximumAlignment, llvm::LLVMContext::MD_dbg, N, llvm::User::operands(), llvm::MDNode::operands(), llvm::NamedMDNode::operands(), and llvm::StringRef::startswith().

◆ getParameterABIAttributes()

static AttrBuilder getParameterABIAttributes ( int  I,
AttributeList  Attrs 
)
static

Definition at line 2943 of file Verifier.cpp.

References llvm::MCID::Add, llvm::AttrBuilder::addAlignmentAttr(), llvm::AttrBuilder::addAttribute(), llvm::Attribute::Alignment, llvm::all_of(), Assert, B, llvm::Attribute::ByVal, E, R600_InstFlag::FC, GEP, llvm::AttributeList::getAttributes(), llvm::CallBase::getAttributes(), llvm::CallBase::getCalledFunction(), llvm::CallBase::getCallingConv(), llvm::CallBase::getFunctionType(), llvm::GetElementPtrInst::getIndexedType(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::FunctionType::getNumParams(), llvm::BinaryOperator::getOpcode(), llvm::UnaryOperator::getOpcode(), llvm::User::getOperand(), llvm::AttributeList::getParamAlignment(), llvm::FunctionType::getParamType(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GetElementPtrInst::getPointerOperandType(), llvm::GetElementPtrInst::getResultElementType(), llvm::FunctionType::getReturnType(), llvm::ReturnInst::getReturnValue(), llvm::Type::getScalarType(), llvm::GetElementPtrInst::getSourceElementType(), llvm::Value::getType(), llvm::InvokeInst::getUnwindDest(), llvm::Type::getVectorNumElements(), llvm::AttributeList::hasParamAttribute(), I, llvm::GetElementPtrInst::idx_begin(), llvm::GetElementPtrInst::idx_end(), llvm::ARM_PROC::IE, llvm::Attribute::InAlloca, llvm::Attribute::InReg, llvm::BasicBlock::isEHPad(), llvm::Type::isFPOrFPVectorTy(), llvm::CmpInst::isFPPredicate(), llvm::CallInst::isInlineAsm(), llvm::Type::isIntOrIntVectorTy(), llvm::CmpInst::isIntPredicate(), llvm::Function::isIntrinsic(), llvm::CallInst::isMustTailCall(), llvm::Type::isPtrOrPtrVectorTy(), llvm::Type::isSized(), isTypeCongruent(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), llvm::FunctionType::isVarArg(), llvm::Type::isVectorTy(), llvm_unreachable, llvm::MipsISD::Ret, llvm::Attribute::Returned, llvm::Attribute::StructRet, llvm::Attribute::SwiftError, and llvm::Attribute::SwiftSelf.

◆ getParentPad()

static Value* getParentPad ( Value EHPad)
static

Definition at line 3476 of file Verifier.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, Arg, llvm::CallBase::arg_size(), llvm::CallBase::args(), assert(), Assert, AssertDI, llvm::MCID::Call, llvm::VerifierSupport::CheckFailed(), llvm::Intrinsic::coro_destroy, llvm::Intrinsic::coro_id, llvm::Intrinsic::coro_resume, llvm::CallBase::countOperandBundlesOfType(), llvm::Intrinsic::ctlz, llvm::Intrinsic::cttz, llvm::Intrinsic::dbg_addr, llvm::Intrinsic::dbg_declare, llvm::Intrinsic::dbg_label, llvm::Intrinsic::dbg_value, llvm::VerifierSupport::DL, llvm::Intrinsic::donothing, llvm::dyn_cast(), llvm::Intrinsic::eh_exceptioncode, llvm::Intrinsic::eh_exceptionpointer, llvm::ArrayRef< T >::empty(), llvm::Intrinsic::experimental_constrained_ceil, llvm::Intrinsic::experimental_constrained_cos, llvm::Intrinsic::experimental_constrained_exp, llvm::Intrinsic::experimental_constrained_exp2, llvm::Intrinsic::experimental_constrained_fadd, llvm::Intrinsic::experimental_constrained_fdiv, llvm::Intrinsic::experimental_constrained_floor, llvm::Intrinsic::experimental_constrained_fma, llvm::Intrinsic::experimental_constrained_fmul, llvm::Intrinsic::experimental_constrained_frem, llvm::Intrinsic::experimental_constrained_fsub, llvm::Intrinsic::experimental_constrained_log, llvm::Intrinsic::experimental_constrained_log10, llvm::Intrinsic::experimental_constrained_log2, llvm::Intrinsic::experimental_constrained_maxnum, llvm::Intrinsic::experimental_constrained_minnum, llvm::Intrinsic::experimental_constrained_nearbyint, llvm::Intrinsic::experimental_constrained_pow, llvm::Intrinsic::experimental_constrained_powi, llvm::Intrinsic::experimental_constrained_rint, llvm::Intrinsic::experimental_constrained_round, llvm::Intrinsic::experimental_constrained_sin, llvm::Intrinsic::experimental_constrained_sqrt, llvm::Intrinsic::experimental_constrained_trunc, llvm::Intrinsic::experimental_deoptimize, llvm::Intrinsic::experimental_gc_relocate, llvm::Intrinsic::experimental_gc_result, llvm::Intrinsic::experimental_gc_statepoint, llvm::Intrinsic::experimental_guard, llvm::Intrinsic::experimental_patchpoint_i64, llvm::Intrinsic::experimental_patchpoint_void, F(), llvm::Function::front(), llvm::Intrinsic::gcread, llvm::Intrinsic::gcroot, llvm::Intrinsic::gcwrite, llvm::ConstantTokenNone::get(), llvm::AllocaInst::getAllocatedType(), llvm::CallBase::getArgOperand(), llvm::DebugLoc::getAsMDNode(), llvm::CallBase::getCalledFunction(), llvm::CallBase::getCalledOperandUse(), llvm::CallBase::getCaller(), llvm::LandingPadInst::getClause(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::GCRelocateInst::getDerivedPtr(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getFirstNonPHI(), llvm::Instruction::getFunction(), llvm::Function::getFunctionType(), llvm::GlobalVariable::getInitializer(), llvm::Function::getIntrinsicID(), llvm::Intrinsic::getIntrinsicInfoTableEntries(), llvm::BasicBlock::getLandingPadInst(), llvm::Instruction::getMetadata(), llvm::Intrinsic::getName(), llvm::Value::getName(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::DataLayout::getNonIntegralAddressSpaces(), llvm::InvokeInst::getNormalDest(), llvm::CallBase::getNumArgOperands(), llvm::LandingPadInst::getNumClauses(), llvm::CatchSwitchInst::getNumHandlers(), llvm::User::getNumOperands(), llvm::MDNode::getNumOperands(), llvm::User::getOperand(), llvm::MDNode::getOperand(), llvm::CallBase::getOperandBundle(), llvm::User::getOperandUse(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::FuncletPadInst::getParentPad(), llvm::CatchSwitchInst::getParentPad(), llvm::Function::getReturnType(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::APFloat::getSemantics(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::InvokeInst::getUnwindDest(), llvm::CatchSwitchInst::getUnwindDest(), llvm::CleanupReturnInst::getUnwindDest(), llvm::ResumeInst::getValue(), llvm::Type::getVectorNumElements(), llvm::CatchSwitchInst::handlers(), llvm::GlobalVariable::hasDefinitiveInitializer(), llvm::Function::hasGC(), llvm::Value::hasName(), llvm::Function::hasPersonalityFn(), I, llvm::APFloatBase::IEEEsingle(), llvm::AMDGPUISD::IF, llvm::Intrinsic::init_trampoline, llvm::SmallSet< T, N, C >::insert(), llvm::SmallVectorImpl< T >::insert(), llvm::Intrinsic::invariant_end, llvm::Intrinsic::invariant_start, llvm::LandingPadInst::isCatch(), llvm::LandingPadInst::isCleanup(), llvm::GlobalVariable::isConstant(), llvm::GlobalValue::isDeclaration(), llvm::Instruction::isEHPad(), llvm::LandingPadInst::isFilter(), llvm::APFloat::isFiniteNonZero(), llvm::Type::isFirstClassType(), llvm::Type::isFPOrFPVectorTy(), llvm::CallInst::isInlineAsm(), llvm::Type::isIntOrIntVectorTy(), llvm::Function::isIntrinsic(), llvm::Type::isMetadataTy(), llvm::APFloat::isNegative(), llvm::Type::isPointerTy(), llvm::APInt::isPowerOf2(), llvm::isPowerOf2_32(), llvm::isPowerOf2_64(), llvm::Type::isPtrOrPtrVectorTy(), llvm::isStatepoint(), llvm::AllocaInst::isStaticAlloca(), llvm::FunctionType::isVarArg(), llvm::Type::isVectorTy(), llvm::Type::isVoidTy(), llvm::Intrinsic::lifetime_end, llvm::Intrinsic::lifetime_start, llvm::Intrinsic::localescape, llvm::Intrinsic::localrecover, llvm::VerifierSupport::M, llvm::BitmaskEnumDetail::Mask(), llvm::Intrinsic::masked_load, llvm::Intrinsic::masked_store, llvm::Intrinsic::matchIntrinsicType(), llvm::Intrinsic::matchIntrinsicVarArg(), llvm::max(), llvm::Value::MaximumAlignment, llvm::LLVMContext::MD_align, llvm::LLVMContext::MD_dereferenceable, llvm::LLVMContext::MD_dereferenceable_or_null, llvm::LLVMContext::MD_fpmath, llvm::LLVMContext::MD_nonnull, llvm::LLVMContext::MD_range, llvm::LLVMContext::MD_tbaa, llvm::Intrinsic::memcpy, llvm::Intrinsic::memcpy_element_unordered_atomic, llvm::Intrinsic::memmove, llvm::Intrinsic::memmove_element_unordered_atomic, llvm::Intrinsic::memset, llvm::Intrinsic::memset_element_unordered_atomic, MI, llvm::LLVMContext::OB_deopt, llvm::LLVMContext::OB_funclet, llvm::pred_empty(), llvm::predecessors(), llvm::Intrinsic::prefetch, llvm::Intrinsic::sadd_sat, llvm::Intrinsic::smul_fix, llvm::Intrinsic::ssub_sat, llvm::Intrinsic::stackprotector, llvm::Value::stripPointerCasts(), llvm::Intrinsic::uadd_sat, llvm::APInt::ule(), llvm::Value::users(), llvm::Value::uses(), and llvm::Intrinsic::usub_sat.

◆ getSubprogram()

static DISubprogram* getSubprogram ( Metadata LocalScope)
static

Carefully grab the subprogram from a local scope.

This carefully grabs the subprogram from a local scope, avoiding the built-in assertions that would typically fire.

Definition at line 4591 of file Verifier.cpp.

References assert(), Assert, AssertDI, llvm::SmallPtrSetImpl< PtrType >::count(), E, llvm::ConstrainedFPIntrinsic::ebInvalid, F(), llvm::DILocalVariable::getArg(), llvm::CallBase::getArgOperand(), llvm::DebugLoc::getAsMDNode(), llvm::Function::getCallingConv(), llvm::Module::getContext(), llvm::Instruction::getDebugLoc(), llvm::ConstrainedFPIntrinsic::getExceptionBehavior(), llvm::DbgVariableIntrinsic::getExpression(), llvm::DbgLabelInst::getLabel(), llvm::Module::getNamedMetadata(), llvm::CallBase::getNumArgOperands(), llvm::DIExpression::getNumElements(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::DbgVariableIntrinsic::getRawExpression(), llvm::DbgLabelInst::getRawLabel(), llvm::DILocation::getRawScope(), llvm::DIVariable::getRawScope(), llvm::DILabel::getRawScope(), llvm::DIVariable::getRawType(), llvm::DbgVariableIntrinsic::getRawVariable(), llvm::ConstrainedFPIntrinsic::getRoundingMode(), llvm::DILocalVariable::getScope(), llvm::DILabel::getScope(), llvm::DIVariable::getSizeInBits(), llvm::DIScope::getSource(), llvm::DILocalScope::getSubprogram(), llvm::DbgVariableIntrinsic::getVariable(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::DILocalVariable::isArtificial(), llvm::LLVMContext::isODRUniquingDebugTypes(), llvm::ConstrainedFPIntrinsic::isTernaryOp(), isType(), llvm::ConstrainedFPIntrinsic::isUnaryOp(), Kind, llvm::makeArrayRef(), llvm::DIExpression::FragmentInfo::OffsetInBits, llvm::ConstrainedFPIntrinsic::rmInvalid, and llvm::DIExpression::FragmentInfo::SizeInBits.

◆ getSuccPad()

static Instruction* getSuccPad ( Instruction Terminator)
static

Definition at line 2052 of file Verifier.cpp.

References llvm::CallingConv::AMDGPU_CS, llvm::CallingConv::AMDGPU_GS, llvm::CallingConv::AMDGPU_HS, llvm::CallingConv::AMDGPU_KERNEL, llvm::CallingConv::AMDGPU_PS, llvm::CallingConv::AMDGPU_VS, llvm::SelectInst::areInvalidOperands(), Arg, llvm::Function::arg_size(), llvm::CallBase::arg_size(), assert(), Assert, AssertDI, llvm::Attribute::Builtin, llvm::CallingConv::C, llvm::MCID::Call, Callee, llvm::Type::canLosslesslyBitCastTo(), llvm::SwitchInst::cases(), llvm::CastInst::castIsValid(), llvm::SmallPtrSetImplBase::clear(), llvm::SmallVectorImpl< T >::clear(), llvm::CallingConv::Cold, llvm::VerifierSupport::Context, llvm::SmallPtrSetImpl< PtrType >::count(), llvm::VerifierSupport::DL, llvm::dyn_cast(), llvm::Intrinsic::experimental_gc_statepoint, F(), llvm::CallingConv::Fast, first, llvm::BasicBlock::front(), llvm::AttributeList::FunctionIndex, llvm::IndirectBrInst::getAddress(), llvm::CallBase::getArgOperand(), llvm::AttributeList::getAttributes(), llvm::CallBase::getAttributes(), llvm::CallBase::getCalledFunction(), llvm::CallBase::getCalledValue(), llvm::BranchInst::getCondition(), llvm::SwitchInst::getCondition(), llvm::Function::getContext(), llvm::Instruction::getDebugLoc(), llvm::IndirectBrInst::getDestination(), llvm::BasicBlock::getFirstNonPHI(), llvm::Instruction::getFunction(), llvm::Function::getFunctionType(), llvm::CallBase::getFunctionType(), llvm::Function::getIntrinsicID(), llvm::Value::getName(), llvm::IndirectBrInst::getNumDestinations(), llvm::SequentialType::getNumElements(), llvm::CallBase::getNumOperandBundles(), llvm::User::getNumOperands(), llvm::FunctionType::getNumParams(), llvm::User::getOperand(), llvm::CallBase::getOperandBundleAt(), llvm::AttributeList::getParamAttributes(), llvm::FunctionType::getParamType(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::Type::getPointerAddressSpace(), llvm::DILocation::getRawScope(), llvm::Function::getReturnType(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::Function::getSubprogram(), llvm::DILocalScope::getSubprogram(), llvm::OperandBundleUse::getTagID(), llvm::BasicBlock::getTerminator(), llvm::SelectInst::getTrueValue(), llvm::Value::getType(), llvm::Type::getVectorNumElements(), llvm::BasicBlock::hasAddressTaken(), llvm::AttributeSet::hasAttribute(), llvm::AttributeList::hasAttribute(), llvm::GlobalValue::hasCommonLinkage(), llvm::CallBase::hasInAllocaArgument(), llvm::AttributeList::hasParamAttribute(), I, llvm::Attribute::InAlloca, llvm::PHINode::incoming_values(), llvm::OperandBundleUse::Inputs, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::CallingConv::Intel_OCL_BI, llvm::BranchInst::isConditional(), llvm::Type::isFirstClassType(), llvm::Type::isFPOrFPVectorTy(), llvm::Type::isIntegerTy(), llvm::Type::isIntOrIntVectorTy(), llvm::Type::isLabelTy(), llvm::Type::isMetadataTy(), llvm::DataLayout::isNonIntegralPointerType(), llvm::Type::isPointerTy(), llvm::Type::isPtrOrPtrVectorTy(), llvm::Function::isSpeculatable(), llvm::Type::isTokenTy(), llvm::Type::isVectorTy(), llvm::Type::isVoidTy(), LLVM_FALLTHROUGH, llvm::BlockAddress::lookup(), llvm::LLVMContext::MD_dbg, llvm::LLVMContext::MD_prof, N, llvm::Attribute::Nest, llvm::LLVMContext::OB_deopt, llvm::LLVMContext::OB_funclet, llvm::LLVMContext::OB_gc_transition, llvm::CallBase::paramHasAttr(), llvm::BasicBlock::phis(), llvm::pred_begin(), llvm::pred_empty(), llvm::pred_end(), llvm::CallingConv::PTX_Device, llvm::CallingConv::PTX_Kernel, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::Attribute::Returned, second, SI, llvm::SmallVectorBase::size(), llvm::sort(), llvm::Attribute::Speculatable, llvm::CallingConv::SPIR_KERNEL, llvm::StringRef::startswith(), llvm::Value::stripInBoundsOffsets(), llvm::Value::stripPointerCasts(), llvm::Attribute::StructRet, llvm::Attribute::SwiftError, llvm::Tag, and llvm::MCID::Terminator.

◆ hasConflictingReferenceFlags()

static bool hasConflictingReferenceFlags ( unsigned  Flags)
static

◆ isContiguous()

static bool isContiguous ( const ConstantRange A,
const ConstantRange B 
)
static

Definition at line 3226 of file Verifier.cpp.

References llvm::Acquire, llvm::AcquireRelease, llvm::CallBase::arg_begin(), llvm::CallBase::arg_end(), assert(), Assert, llvm::MCID::Call, llvm::VerifierSupport::DL, llvm::dyn_cast(), E, llvm::AtomicRMWInst::FIRST_BINOP, llvm::PointerType::getAddressSpace(), llvm::ExtractValueInst::getAggregateOperand(), llvm::InsertValueInst::getAggregateOperand(), llvm::AllocaInst::getAlignment(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::DataLayout::getAllocaAddrSpace(), llvm::AllocaInst::getAllocatedType(), llvm::AllocaInst::getArraySize(), llvm::PointerType::getElementType(), llvm::AtomicCmpXchgInst::getFailureOrdering(), llvm::ExtractValueInst::getIndexedType(), llvm::ExtractValueInst::getIndices(), llvm::InsertValueInst::getIndices(), llvm::ConstantRange::getLower(), llvm::Instruction::getMetadata(), llvm::MDNode::getNumOperands(), llvm::User::getOperand(), llvm::MDNode::getOperand(), llvm::AtomicRMWInst::getOperation(), llvm::AtomicRMWInst::getOperationName(), llvm::LoadInst::getOrdering(), llvm::StoreInst::getOrdering(), llvm::FenceInst::getOrdering(), llvm::AtomicRMWInst::getOrdering(), llvm::AtomicCmpXchgInst::getSuccessOrdering(), llvm::LoadInst::getSyncScopeID(), llvm::StoreInst::getSyncScopeID(), llvm::AllocaInst::getType(), llvm::ConstantInt::getType(), llvm::Value::getType(), llvm::DataLayout::getTypeSizeInBits(), llvm::ConstantRange::getUpper(), llvm::ConstantInt::getValue(), High, I, llvm::ConstantRange::intersectWith(), llvm::Instruction::isAtomic(), llvm::ConstantRange::isEmptySet(), llvm::Type::isFloatingPointTy(), llvm::ConstantRange::isFullSet(), llvm::Type::isIntegerTy(), llvm::Type::isIntOrPtrTy(), llvm::Type::isSized(), llvm::isStrongerThan(), llvm::AllocaInst::isSwiftError(), llvm::AtomicRMWInst::LAST_BINOP, llvm::Value::MaximumAlignment, llvm::LLVMContext::MD_range, llvm::NotAtomic, llvm::CallBase::paramHasAttr(), llvm::Release, llvm::SequentiallyConsistent, llvm::APInt::sgt(), SI, Size, llvm::Attribute::SwiftError, llvm::SyncScope::System, llvm::Unordered, and llvm::Value::users().

◆ isDINode()

static bool isDINode ( const Metadata MD)
static

◆ isFuncOnlyAttr()

static bool isFuncOnlyAttr ( Attribute::AttrKind  Kind)
static

◆ isFuncOrArgAttr()

static bool isFuncOrArgAttr ( Attribute::AttrKind  Kind)
static

Return true if this is a function attribute that can also appear on arguments.

Definition at line 1529 of file Verifier.cpp.

References A, llvm::Attribute::AllocSize, llvm::Attribute::AlwaysInline, llvm::CallBase::arg_size(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), Assert, llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, llvm::Attribute::ByVal, llvm::MCID::Call, llvm::Type::canLosslesslyBitCastTo(), llvm::CastInst::castIsValid(), llvm::VerifierSupport::CheckFailed(), llvm::VerifierSupport::Context, llvm::VerifierSupport::DL, llvm::CallBase::doesNotAccessMemory(), llvm::dyn_cast(), llvm::SmallVectorBase::empty(), llvm::Intrinsic::experimental_gc_statepoint, llvm::AttributeList::FunctionIndex, llvm::AttributeSet::get(), llvm::AttributeList::getAllocSizeArgs(), llvm::CallBase::getArgOperand(), llvm::AttributeSet::getAsString(), llvm::CallBase::getAttributes(), llvm::CallBase::getCalledFunction(), llvm::AttributeList::getFnAttributes(), llvm::Function::getIntrinsicID(), llvm::AttributeList::getNumAttrSets(), llvm::MDNode::getNumOperands(), llvm::FunctionType::getNumParams(), llvm::ConstantExpr::getOpcode(), llvm::User::getOperand(), llvm::MDNode::getOperand(), llvm::AttributeList::getParamAttributes(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::AttributeList::getRetAttributes(), llvm::FunctionType::getReturnType(), llvm::MDString::getString(), llvm::Value::getType(), llvm::AttributeSet::hasAttribute(), llvm::AttributeSet::hasAttributes(), llvm::AttributeList::hasAttributes(), llvm::AttributeList::hasFnAttribute(), llvm::GlobalValue::hasGlobalUnnamedAddr(), llvm::Attribute::InaccessibleMemOnly, llvm::Attribute::InaccessibleMemOrArgMemOnly, llvm::Attribute::InAlloca, llvm::Attribute::InReg, llvm::AttributeList::isEmpty(), isFuncOnlyAttr(), llvm::isInt< 32 >(), llvm::Type::isIntegerTy(), llvm::DataLayout::isNonIntegralPointerType(), llvm::Attribute::JumpTable, llvm::VerifierSupport::M, llvm::MaskAll, llvm::LLVMContext::MD_prof, llvm::Attribute::MinSize, Name, llvm::Attribute::Nest, llvm::Attribute::NoCapture, llvm::Attribute::NoInline, llvm::CallBase::onlyAccessesArgMemory(), llvm::CallBase::onlyReadsMemory(), llvm::User::operands(), llvm::Attribute::OptimizeForSize, llvm::Attribute::OptimizeNone, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::Attribute::ReadNone, llvm::Attribute::ReadOnly, llvm::Attribute::Returned, llvm::Attribute::SExt, llvm::Attribute::StructRet, llvm::Attribute::SwiftError, llvm::Attribute::SwiftSelf, llvm::AttributeFuncs::typeIncompatible(), llvm::Value::users(), llvm::Attribute::WriteOnly, and llvm::Attribute::ZExt.

◆ isNewFormatTBAATypeNode()

static bool isNewFormatTBAATypeNode ( llvm::MDNode Type)
static

◆ IsRootTBAANode()

static bool IsRootTBAANode ( const MDNode MD)
static

◆ IsScalarTBAANodeImpl()

static bool IsScalarTBAANodeImpl ( const MDNode MD,
SmallPtrSetImpl< const MDNode *> &  Visited 
)
static

◆ isScope()

static bool isScope ( const Metadata MD)
static

Definition at line 858 of file Verifier.cpp.

Referenced by hasConflictingReferenceFlags(), and isDINode().

◆ isType()

static bool isType ( const Metadata MD)
static

◆ isTypeCongruent()

static bool isTypeCongruent ( Type L,
Type R 
)
static

Two types are "congruent" if they are identical, or if they are both pointer types with different pointee types and the same address space.

Definition at line 2933 of file Verifier.cpp.

References llvm::dyn_cast(), llvm::PointerType::getAddressSpace(), llvm::AArch64CC::PL, and llvm::RISCVFenceField::R.

Referenced by getParameterABIAttributes().