LLVM  6.0.0svn
Enumerations | Functions | Variables
BitcodeReader.cpp File Reference
#include "llvm/Bitcode/BitcodeReader.h"
#include "MetadataLoader.h"
#include "ValueList.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Bitcode/LLVMBitCodes.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Comdat.h"
#include "llvm/IR/Constant.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/Function.h"
#include "llvm/IR/GVMaterializer.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalIFunc.h"
#include "llvm/IR/GlobalIndirectSymbol.h"
#include "llvm/IR/GlobalObject.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSummaryIndex.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <deque>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <system_error>
#include <tuple>
#include <utility>
#include <vector>

Go to the source code of this file.

Enumerations

enum  
 

Functions

static Error error (const Twine &Message)
 
static bool hasValidBitcodeHeader (BitstreamCursor &Stream)
 Helper to read the header common to all bitcode files. More...
 
static Expected< BitstreamCursorinitStream (MemoryBufferRef Buffer)
 
template<typename StrTy >
static bool convertToString (ArrayRef< uint64_t > Record, unsigned Idx, StrTy &Result)
 Convert a string from a record into an std::string, return true on failure. More...
 
static void stripTBAA (Module *M)
 
static Expected< std::string > readIdentificationBlock (BitstreamCursor &Stream)
 Read the "IDENTIFICATION_BLOCK_ID" block, do some basic enforcement on the "epoch" encoded in the bitcode, and return the producer name if any. More...
 
static Expected< std::string > readIdentificationCode (BitstreamCursor &Stream)
 
static Expected< boolhasObjCCategoryInModule (BitstreamCursor &Stream)
 
static Expected< boolhasObjCCategory (BitstreamCursor &Stream)
 
static Expected< std::string > readModuleTriple (BitstreamCursor &Stream)
 
static Expected< std::string > readTriple (BitstreamCursor &Stream)
 
static bool hasImplicitComdat (size_t Val)
 
static GlobalValue::LinkageTypes getDecodedLinkage (unsigned Val)
 
static FunctionSummary::FFlags getDecodedFFlags (uint64_t RawFlags)
 
static GlobalValueSummary::GVFlags getDecodedGVSummaryFlags (uint64_t RawFlags, uint64_t Version)
 Decode the flags for GlobalValue in the summary. More...
 
static GlobalValue::VisibilityTypes getDecodedVisibility (unsigned Val)
 
static GlobalValue::DLLStorageClassTypes getDecodedDLLStorageClass (unsigned Val)
 
static GlobalVariable::ThreadLocalMode getDecodedThreadLocalMode (unsigned Val)
 
static GlobalVariable::UnnamedAddr getDecodedUnnamedAddrType (unsigned Val)
 
static int getDecodedCastOpcode (unsigned Val)
 
static int getDecodedBinaryOpcode (unsigned Val, Type *Ty)
 
static AtomicRMWInst::BinOp getDecodedRMWOperation (unsigned Val)
 
static AtomicOrdering getDecodedOrdering (unsigned Val)
 
static Comdat::SelectionKind getDecodedComdatSelectionKind (unsigned Val)
 
static FastMathFlags getDecodedFastMathFlags (unsigned Val)
 
static void upgradeDLLImportExportLinkage (GlobalValue *GV, unsigned Val)
 
static uint64_t getRawAttributeMask (Attribute::AttrKind Val)
 
static void addRawAttributeValue (AttrBuilder &B, uint64_t Val)
 
static void decodeLLVMAttributesForBitcode (AttrBuilder &B, uint64_t EncodedAttrs)
 This fills an AttrBuilder object with the LLVM attributes that have been decoded from the given integer. More...
 
static Attribute::AttrKind getAttrFromCode (uint64_t Code)
 
static uint64_t jumpToValueSymbolTable (uint64_t Offset, BitstreamCursor &Stream)
 Helper to note and return the current location, and jump to the given offset. More...
 
static APInt readWideAPInt (ArrayRef< uint64_t > Vals, unsigned TypeBits)
 
static Expected< StringRefreadBlobInRecord (BitstreamCursor &Stream, unsigned Block, unsigned RecordID)
 
static Expected< BitcodeModulegetSingleModule (MemoryBufferRef Buffer)
 

Variables

static cl::opt< boolPrintSummaryGUIDs ("print-summary-global-ids", cl::init(false), cl::Hidden, cl::desc("Print the global id for each value when reading the module summary"))
 
static ManagedStatic< BitcodeErrorCategoryType > ErrorCategory
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 97 of file BitcodeReader.cpp.

Function Documentation

◆ addRawAttributeValue()

static void addRawAttributeValue ( AttrBuilder B,
uint64_t  Val 
)
static

◆ convertToString()

template<typename StrTy >
static bool convertToString ( ArrayRef< uint64_t >  Record,
unsigned  Idx,
StrTy &  Result 
)
static

Convert a string from a record into an std::string, return true on failure.

Definition at line 144 of file BitcodeReader.cpp.

References llvm::ArrayRef< T >::size().

Referenced by getAttrFromCode(), hasObjCCategoryInModule(), jumpToValueSymbolTable(), readIdentificationBlock(), readModuleTriple(), and readWideAPInt().

◆ decodeLLVMAttributesForBitcode()

static void decodeLLVMAttributesForBitcode ( AttrBuilder B,
uint64_t  EncodedAttrs 
)
static

◆ error()

static Error error ( const Twine Message)
static

◆ getAttrFromCode()

static Attribute::AttrKind getAttrFromCode ( uint64_t  Code)
static

Definition at line 1261 of file BitcodeReader.cpp.

References llvm::AttrBuilder::addAlignmentAttr(), llvm::AttrBuilder::addAllocSizeAttrFromRawRepr(), llvm::AttrBuilder::addAttribute(), llvm::AttrBuilder::addDereferenceableAttr(), llvm::AttrBuilder::addDereferenceableOrNullAttr(), llvm::AttrBuilder::addStackAlignmentAttr(), llvm::BitstreamCursor::advanceSkippingSubblocks(), assert(), llvm::bitc::ATTR_KIND_ALIGNMENT, llvm::bitc::ATTR_KIND_ALLOC_SIZE, llvm::bitc::ATTR_KIND_ALWAYS_INLINE, llvm::bitc::ATTR_KIND_ARGMEMONLY, llvm::bitc::ATTR_KIND_BUILTIN, llvm::bitc::ATTR_KIND_BY_VAL, llvm::bitc::ATTR_KIND_COLD, llvm::bitc::ATTR_KIND_CONVERGENT, llvm::bitc::ATTR_KIND_DEREFERENCEABLE, llvm::bitc::ATTR_KIND_DEREFERENCEABLE_OR_NULL, llvm::bitc::ATTR_KIND_IN_ALLOCA, llvm::bitc::ATTR_KIND_IN_REG, llvm::bitc::ATTR_KIND_INACCESSIBLEMEM_ONLY, llvm::bitc::ATTR_KIND_INACCESSIBLEMEM_OR_ARGMEMONLY, llvm::bitc::ATTR_KIND_INLINE_HINT, llvm::bitc::ATTR_KIND_JUMP_TABLE, llvm::bitc::ATTR_KIND_MIN_SIZE, llvm::bitc::ATTR_KIND_NAKED, llvm::bitc::ATTR_KIND_NEST, llvm::bitc::ATTR_KIND_NO_ALIAS, llvm::bitc::ATTR_KIND_NO_BUILTIN, llvm::bitc::ATTR_KIND_NO_CAPTURE, llvm::bitc::ATTR_KIND_NO_DUPLICATE, llvm::bitc::ATTR_KIND_NO_IMPLICIT_FLOAT, llvm::bitc::ATTR_KIND_NO_INLINE, llvm::bitc::ATTR_KIND_NO_RECURSE, llvm::bitc::ATTR_KIND_NO_RED_ZONE, llvm::bitc::ATTR_KIND_NO_RETURN, llvm::bitc::ATTR_KIND_NO_UNWIND, llvm::bitc::ATTR_KIND_NON_LAZY_BIND, llvm::bitc::ATTR_KIND_NON_NULL, llvm::bitc::ATTR_KIND_OPTIMIZE_FOR_SIZE, llvm::bitc::ATTR_KIND_OPTIMIZE_NONE, llvm::bitc::ATTR_KIND_READ_NONE, llvm::bitc::ATTR_KIND_READ_ONLY, llvm::bitc::ATTR_KIND_RETURNED, llvm::bitc::ATTR_KIND_RETURNS_TWICE, llvm::bitc::ATTR_KIND_S_EXT, llvm::bitc::ATTR_KIND_SAFESTACK, llvm::bitc::ATTR_KIND_SANITIZE_ADDRESS, llvm::bitc::ATTR_KIND_SANITIZE_MEMORY, llvm::bitc::ATTR_KIND_SANITIZE_THREAD, llvm::bitc::ATTR_KIND_SPECULATABLE, llvm::bitc::ATTR_KIND_STACK_ALIGNMENT, llvm::bitc::ATTR_KIND_STACK_PROTECT, llvm::bitc::ATTR_KIND_STACK_PROTECT_REQ, llvm::bitc::ATTR_KIND_STACK_PROTECT_STRONG, llvm::bitc::ATTR_KIND_STRICT_FP, llvm::bitc::ATTR_KIND_STRUCT_RET, llvm::bitc::ATTR_KIND_SWIFT_ERROR, llvm::bitc::ATTR_KIND_SWIFT_SELF, llvm::bitc::ATTR_KIND_UW_TABLE, llvm::bitc::ATTR_KIND_WRITEONLY, llvm::bitc::ATTR_KIND_Z_EXT, B, llvm::SmallVectorTemplateCommon< T >::back(), llvm::SmallVectorImpl< T >::clear(), llvm::CallingConv::Cold, llvm::MCID::Convergent, convertToString(), llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::dyn_cast(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::Exponent, llvm::IntegerType::get(), llvm::FunctionType::get(), llvm::StructType::get(), llvm::AttributeList::get(), llvm::ArrayType::get(), llvm::VectorType::get(), llvm::PointerType::get(), llvm::Type::getDoubleTy(), llvm::Type::getFloatTy(), llvm::Type::getFP128Ty(), llvm::Type::getHalfTy(), llvm::Type::getLabelTy(), llvm::Type::getMetadataTy(), llvm::Value::getName(), llvm::LLVMContext::getOrInsertSyncScopeID(), llvm::Type::getPPC_FP128Ty(), llvm::Type::getTokenTy(), llvm::Type::getVoidTy(), llvm::Type::getX86_FP80Ty(), llvm::Type::getX86_MMXTy(), llvm::BitstreamEntry::ID, llvm::Triple::isOSBinFormatMachO(), llvm::FunctionType::isValidArgumentType(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::ISD::JumpTable, llvm::BitstreamEntry::Kind, Kind, llvm::IntegerType::MAX_INT_BITS, llvm::Value::MaxAlignmentExponent, llvm::IntegerType::MIN_INT_BITS, llvm::NoAlias, llvm::Attribute::None, llvm::StringRef::npos, llvm::bitc::OPERAND_BUNDLE_TAG, llvm::bitc::OPERAND_BUNDLE_TAGS_BLOCK_ID, llvm::bitc::PARAMATTR_GROUP_BLOCK_ID, llvm::bitc::PARAMATTR_GRP_CODE_ENTRY, parseAttrKind(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, llvm::StructType::setBody(), llvm::GlobalObject::setComdat(), llvm::Value::setName(), llvm::StructType::setName(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::SmallString< InternalLen >::str(), llvm::BitstreamEntry::SubBlock, llvm::Error::success(), llvm::bitc::SYNC_SCOPE_NAME, llvm::bitc::SYNC_SCOPE_NAMES_BLOCK_ID, llvm::bitc::TYPE_BLOCK_ID_NEW, llvm::bitc::TYPE_CODE_ARRAY, llvm::bitc::TYPE_CODE_DOUBLE, llvm::bitc::TYPE_CODE_FLOAT, llvm::bitc::TYPE_CODE_FP128, llvm::bitc::TYPE_CODE_FUNCTION, llvm::bitc::TYPE_CODE_FUNCTION_OLD, llvm::bitc::TYPE_CODE_HALF, llvm::bitc::TYPE_CODE_INTEGER, llvm::bitc::TYPE_CODE_LABEL, llvm::bitc::TYPE_CODE_METADATA, llvm::bitc::TYPE_CODE_NUMENTRY, llvm::bitc::TYPE_CODE_OPAQUE, llvm::bitc::TYPE_CODE_POINTER, llvm::bitc::TYPE_CODE_PPC_FP128, llvm::bitc::TYPE_CODE_STRUCT_ANON, llvm::bitc::TYPE_CODE_STRUCT_NAME, llvm::bitc::TYPE_CODE_STRUCT_NAMED, llvm::bitc::TYPE_CODE_TOKEN, llvm::bitc::TYPE_CODE_VECTOR, llvm::bitc::TYPE_CODE_VOID, llvm::bitc::TYPE_CODE_X86_FP80, llvm::bitc::TYPE_CODE_X86_MMX, and llvm::AMDGPU::HSAMD::Kernel::Arg::Key::TypeName.

◆ getDecodedBinaryOpcode()

static int getDecodedBinaryOpcode ( unsigned  Val,
Type Ty 
)
static

◆ getDecodedCastOpcode()

static int getDecodedCastOpcode ( unsigned  Val)
static

◆ getDecodedComdatSelectionKind()

static Comdat::SelectionKind getDecodedComdatSelectionKind ( unsigned  Val)
static

◆ getDecodedDLLStorageClass()

static GlobalValue::DLLStorageClassTypes getDecodedDLLStorageClass ( unsigned  Val)
static

◆ getDecodedFastMathFlags()

static FastMathFlags getDecodedFastMathFlags ( unsigned  Val)
static

◆ getDecodedFFlags()

static FunctionSummary::FFlags getDecodedFFlags ( uint64_t  RawFlags)
static

◆ getDecodedGVSummaryFlags()

static GlobalValueSummary::GVFlags getDecodedGVSummaryFlags ( uint64_t  RawFlags,
uint64_t  Version 
)
static

Decode the flags for GlobalValue in the summary.

Definition at line 880 of file BitcodeReader.cpp.

Referenced by readWideAPInt().

◆ getDecodedLinkage()

static GlobalValue::LinkageTypes getDecodedLinkage ( unsigned  Val)
static

◆ getDecodedOrdering()

static AtomicOrdering getDecodedOrdering ( unsigned  Val)
static

◆ getDecodedRMWOperation()

static AtomicRMWInst::BinOp getDecodedRMWOperation ( unsigned  Val)
static

◆ getDecodedThreadLocalMode()

static GlobalVariable::ThreadLocalMode getDecodedThreadLocalMode ( unsigned  Val)
static

◆ getDecodedUnnamedAddrType()

static GlobalVariable::UnnamedAddr getDecodedUnnamedAddrType ( unsigned  Val)
static

◆ getDecodedVisibility()

static GlobalValue::VisibilityTypes getDecodedVisibility ( unsigned  Val)
static

◆ getRawAttributeMask()

static uint64_t getRawAttributeMask ( Attribute::AttrKind  Val)
static

◆ getSingleModule()

static Expected<BitcodeModule> getSingleModule ( MemoryBufferRef  Buffer)
static

◆ hasImplicitComdat()

static bool hasImplicitComdat ( size_t  Val)
static

Definition at line 816 of file BitcodeReader.cpp.

Referenced by readWideAPInt().

◆ hasObjCCategory()

static Expected<bool> hasObjCCategory ( BitstreamCursor Stream)
static

◆ hasObjCCategoryInModule()

static Expected<bool> hasObjCCategoryInModule ( BitstreamCursor Stream)
static

◆ hasValidBitcodeHeader()

static bool hasValidBitcodeHeader ( BitstreamCursor Stream)
static

Helper to read the header common to all bitcode files.

Definition at line 109 of file BitcodeReader.cpp.

References llvm::SimpleBitstreamCursor::canSkipToPos(), and llvm::SimpleBitstreamCursor::Read().

Referenced by initStream().

◆ initStream()

static Expected<BitstreamCursor> initStream ( MemoryBufferRef  Buffer)
static

◆ jumpToValueSymbolTable()

static uint64_t jumpToValueSymbolTable ( uint64_t  Offset,
BitstreamCursor Stream 
)
static

◆ readBlobInRecord()

static Expected<StringRef> readBlobInRecord ( BitstreamCursor Stream,
unsigned  Block,
unsigned  RecordID 
)
static

◆ readIdentificationBlock()

static Expected<std::string> readIdentificationBlock ( BitstreamCursor Stream)
static

◆ readIdentificationCode()

static Expected<std::string> readIdentificationCode ( BitstreamCursor Stream)
static

◆ readModuleTriple()

static Expected<std::string> readModuleTriple ( BitstreamCursor Stream)
static

◆ readTriple()

static Expected<std::string> readTriple ( BitstreamCursor Stream)
static

◆ readWideAPInt()

static APInt readWideAPInt ( ArrayRef< uint64_t >  Vals,
unsigned  TypeBits 
)
static

Definition at line 2092 of file BitcodeReader.cpp.

References llvm::Acquire, llvm::AcquireRelease, llvm::MCID::Add, llvm::SwitchInst::addCase(), llvm::LandingPadInst::addClause(), llvm::IndirectBrInst::addDestination(), llvm::ModuleSummaryIndex::addGlobalValueSummary(), llvm::PHINode::addIncoming(), llvm::ModuleSummaryIndex::addModule(), llvm::NamedMDNode::addOperand(), llvm::ModuleSummaryIndex::addOriginalName(), llvm::dwarf::syntax::Address, llvm::BitstreamCursor::advance(), llvm::BitstreamCursor::advanceSkippingSubblocks(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::FastMathFlags::any(), llvm::lltok::APFloat, llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::Function::args(), AS, assert(), llvm::SimpleBitstreamCursor::AtEndOfStream(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::BasicBlock::back(), llvm::Function::back(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ArrayRef< T >::begin(), llvm::Function::begin(), llvm::bitc::BLOCKINFO_BLOCK_ID, C, llvm::SmallString< InternalLen >::c_str(), llvm::bitc::CALL_CCONV, llvm::bitc::CALL_EXPLICIT_TYPE, llvm::bitc::CALL_FMF, llvm::bitc::CALL_MUSTTAIL, llvm::bitc::CALL_NOTAIL, llvm::bitc::CALL_TAIL, Callee, llvm::CastInst::castIsValid(), llvm::LandingPadInst::Catch, llvm::ModuleSummaryIndex::cfiFunctionDecls(), llvm::ModuleSummaryIndex::cfiFunctionDefs(), llvm::SmallVectorImpl< T >::clear(), llvm::bitc::CONSTANTS_BLOCK_ID, convertToString(), llvm::CorruptedBitcode, llvm::GlobalAlias::create(), llvm::GlobalIFunc::create(), llvm::BasicBlock::Create(), llvm::Function::Create(), llvm::BinaryOperator::Create(), llvm::CastInst::Create(), llvm::GetElementPtrInst::Create(), llvm::CallInst::Create(), llvm::SelectInst::Create(), llvm::ExtractElementInst::Create(), llvm::InsertElementInst::Create(), llvm::ExtractValueInst::Create(), llvm::InsertValueInst::Create(), llvm::PHINode::Create(), llvm::LandingPadInst::Create(), llvm::ReturnInst::Create(), llvm::BranchInst::Create(), llvm::SwitchInst::Create(), llvm::IndirectBrInst::Create(), llvm::InvokeInst::Create(), llvm::ResumeInst::Create(), llvm::CatchSwitchInst::Create(), llvm::CleanupPadInst::Create(), llvm::CatchPadInst::Create(), llvm::CatchReturnInst::Create(), llvm::CleanupReturnInst::Create(), llvm::bitc::CST_CODE_AGGREGATE, llvm::bitc::CST_CODE_BLOCKADDRESS, llvm::bitc::CST_CODE_CE_BINOP, llvm::bitc::CST_CODE_CE_CAST, llvm::bitc::CST_CODE_CE_CMP, llvm::bitc::CST_CODE_CE_EXTRACTELT, llvm::bitc::CST_CODE_CE_GEP, llvm::bitc::CST_CODE_CE_GEP_WITH_INRANGE_INDEX, llvm::bitc::CST_CODE_CE_INBOUNDS_GEP, llvm::bitc::CST_CODE_CE_INSERTELT, llvm::bitc::CST_CODE_CE_SELECT, llvm::bitc::CST_CODE_CE_SHUFFLEVEC, llvm::bitc::CST_CODE_CE_SHUFVEC_EX, llvm::bitc::CST_CODE_CSTRING, llvm::bitc::CST_CODE_DATA, llvm::bitc::CST_CODE_FLOAT, llvm::bitc::CST_CODE_INLINEASM, llvm::bitc::CST_CODE_INLINEASM_OLD, llvm::bitc::CST_CODE_INTEGER, llvm::bitc::CST_CODE_NULL, llvm::bitc::CST_CODE_SETTYPE, llvm::bitc::CST_CODE_STRING, llvm::bitc::CST_CODE_UNDEF, llvm::bitc::CST_CODE_WIDE_INTEGER, llvm::dbgs(), llvm::Default, llvm::GlobalValue::DefaultVisibility, llvm::Value::deleteValue(), llvm::dyn_cast(), E, llvm::SmallVectorBase::empty(), llvm::StringRef::empty(), llvm::ArrayRef< T >::empty(), llvm::BasicBlock::empty(), llvm::Function::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::Function::end(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, error_category, llvm::GlobalValue::ExternalLinkage, F(), llvm::LandingPadInst::Filter, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::ModuleSummaryIndex::findSummaryInModule(), llvm::StringMapEntry< ValueTy >::first(), first, llvm::AtomicRMWInst::FIRST_BINOP, llvm::bitc::FS_ALIAS, llvm::bitc::FS_CFI_FUNCTION_DECLS, llvm::bitc::FS_CFI_FUNCTION_DEFS, llvm::bitc::FS_COMBINED, llvm::bitc::FS_COMBINED_ALIAS, llvm::bitc::FS_COMBINED_GLOBALVAR_INIT_REFS, llvm::bitc::FS_COMBINED_ORIGINAL_NAME, llvm::bitc::FS_COMBINED_PROFILE, llvm::bitc::FS_PERMODULE, llvm::bitc::FS_PERMODULE_GLOBALVAR_INIT_REFS, llvm::bitc::FS_PERMODULE_PROFILE, llvm::bitc::FS_TYPE_CHECKED_LOAD_CONST_VCALL, llvm::bitc::FS_TYPE_CHECKED_LOAD_VCALLS, llvm::bitc::FS_TYPE_TEST_ASSUME_CONST_VCALL, llvm::bitc::FS_TYPE_TEST_ASSUME_VCALLS, llvm::bitc::FS_TYPE_TESTS, llvm::bitc::FS_VALUE_GUID, llvm::bitc::FS_VERSION, llvm::bitc::FULL_LTO_GLOBALVAL_SUMMARY_BLOCK_ID, llvm::bitc::FUNC_CODE_DEBUG_LOC, llvm::bitc::FUNC_CODE_DEBUG_LOC_AGAIN, llvm::bitc::FUNC_CODE_DECLAREBLOCKS, llvm::bitc::FUNC_CODE_INST_ALLOCA, llvm::bitc::FUNC_CODE_INST_ATOMICRMW, llvm::bitc::FUNC_CODE_INST_BINOP, llvm::bitc::FUNC_CODE_INST_BR, llvm::bitc::FUNC_CODE_INST_CALL, llvm::bitc::FUNC_CODE_INST_CAST, llvm::bitc::FUNC_CODE_INST_CATCHPAD, llvm::bitc::FUNC_CODE_INST_CATCHRET, llvm::bitc::FUNC_CODE_INST_CATCHSWITCH, llvm::bitc::FUNC_CODE_INST_CLEANUPPAD, llvm::bitc::FUNC_CODE_INST_CLEANUPRET, llvm::bitc::FUNC_CODE_INST_CMP, llvm::bitc::FUNC_CODE_INST_CMP2, llvm::bitc::FUNC_CODE_INST_CMPXCHG, llvm::bitc::FUNC_CODE_INST_CMPXCHG_OLD, llvm::bitc::FUNC_CODE_INST_EXTRACTELT, llvm::bitc::FUNC_CODE_INST_EXTRACTVAL, llvm::bitc::FUNC_CODE_INST_FENCE, llvm::bitc::FUNC_CODE_INST_GEP, llvm::bitc::FUNC_CODE_INST_GEP_OLD, llvm::bitc::FUNC_CODE_INST_INBOUNDS_GEP_OLD, llvm::bitc::FUNC_CODE_INST_INDIRECTBR, llvm::bitc::FUNC_CODE_INST_INSERTELT, llvm::bitc::FUNC_CODE_INST_INSERTVAL, llvm::bitc::FUNC_CODE_INST_INVOKE, llvm::bitc::FUNC_CODE_INST_LANDINGPAD, llvm::bitc::FUNC_CODE_INST_LANDINGPAD_OLD, llvm::bitc::FUNC_CODE_INST_LOAD, llvm::bitc::FUNC_CODE_INST_LOADATOMIC, llvm::bitc::FUNC_CODE_INST_PHI, llvm::bitc::FUNC_CODE_INST_RESUME, llvm::bitc::FUNC_CODE_INST_RET, llvm::bitc::FUNC_CODE_INST_SELECT, llvm::bitc::FUNC_CODE_INST_SHUFFLEVEC, llvm::bitc::FUNC_CODE_INST_STORE, llvm::bitc::FUNC_CODE_INST_STORE_OLD, llvm::bitc::FUNC_CODE_INST_STOREATOMIC, llvm::bitc::FUNC_CODE_INST_STOREATOMIC_OLD, llvm::bitc::FUNC_CODE_INST_SWITCH, llvm::bitc::FUNC_CODE_INST_UNREACHABLE, llvm::bitc::FUNC_CODE_INST_VAARG, llvm::bitc::FUNC_CODE_INST_VSELECT, llvm::bitc::FUNC_CODE_OPERAND_BUNDLE, llvm::bitc::FUNCTION_BLOCK_ID, llvm::DebugLoc::get(), llvm::InlineAsm::get(), llvm::ConstantInt::get(), llvm::ConstantFP::get(), llvm::VectorType::get(), llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::ConstantVector::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), llvm::BlockAddress::get(), llvm::ConstantExpr::get(), llvm::UndefValue::get(), llvm::DataLayout::getAllocaAddrSpace(), llvm::Type::getArrayNumElements(), llvm::Intrinsic::getAttributes(), getBitWidth(), llvm::ConstantExpr::getCast(), llvm::SimpleBitstreamCursor::GetCurrentBitNo(), getDecodedBinaryOpcode(), getDecodedCastOpcode(), getDecodedComdatSelectionKind(), getDecodedDLLStorageClass(), getDecodedFastMathFlags(), getDecodedFFlags(), getDecodedGVSummaryFlags(), getDecodedLinkage(), getDecodedOrdering(), getDecodedRMWOperation(), getDecodedThreadLocalMode(), getDecodedUnnamedAddrType(), getDecodedVisibility(), llvm::SequentialType::getElementType(), llvm::PointerType::getElementType(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getFCmp(), llvm::AttributeList::getFnAttributes(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), llvm::ConstantExpr::getGetElementPtr(), llvm::GlobalValue::getGlobalIdentifier(), llvm::ValueInfo::getGUID(), llvm::GlobalValue::getGUID(), llvm::ConstantExpr::getICmp(), llvm::ConstantExpr::getInsertElement(), llvm::BasicBlock::getInstList(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), llvm::SequentialType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::ModuleSummaryIndex::getOrInsertValueInfo(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::Function::getPersonalityFn(), llvm::Type::getScalarType(), llvm::ConstantExpr::getSelect(), llvm::ConstantExpr::getShuffleVector(), llvm::ConstantDataArray::getString(), llvm::AtomicCmpXchgInst::getStrongestFailureOrdering(), llvm::Type::getTokenTy(), getType(), llvm::Value::getType(), llvm::Type::getVoidTy(), llvm::bitc::GLOBALVAL_SUMMARY_BLOCK_ID, hasImplicitComdat(), llvm::GlobalValue::hasLocalLinkage(), llvm::Value::hasName(), llvm::Function::hasPersonalityFn(), High, I, llvm::BitstreamEntry::ID, llvm::ARM_PROC::IE, llvm::APFloatBase::IEEEdouble(), llvm::APFloatBase::IEEEhalf(), llvm::APFloatBase::IEEEquad(), llvm::APFloatBase::IEEEsingle(), llvm::instructions(), llvm::Type::isArrayTy(), isConstant(), llvm::Type::isDoubleTy(), llvm::PossiblyExactOperator::IsExact, llvm::Type::isFloatTy(), llvm::Type::isFP128Ty(), llvm::Type::isFPOrFPVectorTy(), llvm::Type::isHalfTy(), llvm::Type::isIntegerTy(), llvm::Type::isLabelTy(), llvm::PointerType::isLoadableOrStorableType(), llvm::GlobalValue::isLocalLinkage(), llvm::Function::isMaterializable(), llvm::Type::isPointerTy(), llvm::Type::isPPC_FP128Ty(), llvm::Type::isStructTy(), llvm::FunctionType::isVarArg(), llvm::Type::isVectorTy(), llvm::Type::isVoidTy(), llvm::Type::isX86_FP80Ty(), llvm::SimpleBitstreamCursor::JumpToBit(), jumpToValueSymbolTable(), llvm::BitstreamEntry::Kind, llvm::AtomicRMWInst::LAST_BINOP, LLVM_FALLTHROUGH, llvm_unreachable, llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), llvm::makeArrayRef(), llvm::BitmaskEnumDetail::Mask(), llvm::Value::materialized_uses(), llvm::CallingConv::MaxID, llvm::LLVMContext::MD_tbaa, llvm::bitc::METADATA_ATTACHMENT_ID, llvm::bitc::METADATA_BLOCK_ID, llvm::bitc::METADATA_KIND_BLOCK_ID, llvm::bitc::MODULE_BLOCK_ID, llvm::bitc::MODULE_CODE_ALIAS, llvm::bitc::MODULE_CODE_ALIAS_OLD, llvm::bitc::MODULE_CODE_ASM, llvm::bitc::MODULE_CODE_COMDAT, llvm::bitc::MODULE_CODE_DATALAYOUT, llvm::bitc::MODULE_CODE_DEPLIB, llvm::bitc::MODULE_CODE_FUNCTION, llvm::bitc::MODULE_CODE_GCNAME, llvm::bitc::MODULE_CODE_GLOBALVAR, llvm::bitc::MODULE_CODE_HASH, llvm::bitc::MODULE_CODE_IFUNC, llvm::bitc::MODULE_CODE_SECTIONNAME, llvm::bitc::MODULE_CODE_SOURCE_FILENAME, llvm::bitc::MODULE_CODE_TRIPLE, llvm::bitc::MODULE_CODE_VERSION, llvm::bitc::MODULE_CODE_VSTOFFSET, llvm::bitc::MODULE_STRTAB_BLOCK_ID, llvm::Monotonic, llvm::bitc::MST_CODE_ENTRY, llvm::bitc::MST_CODE_HASH, name, llvm::GlobalValue::None, llvm::OverflowingBinaryOperator::NoSignedWrap, llvm::NotAtomic, llvm::GlobalValue::NotThreadLocal, llvm::OverflowingBinaryOperator::NoUnsignedWrap, llvm::bitc::OBO_NO_SIGNED_WRAP, llvm::bitc::OBO_NO_UNSIGNED_WRAP, llvm::bitc::OPERAND_BUNDLE_TAGS_BLOCK_ID, llvm::bitc::PARAMATTR_BLOCK_ID, llvm::bitc::PARAMATTR_GROUP_BLOCK_ID, llvm::bitc::PEO_EXACT, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), llvm::APFloatBase::PPCDoubleDouble(), PrintSummaryGUIDs, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back(), llvm::BitstreamCursor::ReadBlockInfoBlock(), llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, llvm::Release, llvm::Intrinsic::remangleIntrinsicFunction(), llvm::MipsISD::Ret, llvm::reverse(), llvm::StringMapEntry< ValueTy >::second, llvm::ARMBuildAttrs::Section, llvm::GlobalObject::setAlignment(), llvm::Function::setAttributes(), llvm::GlobalVariable::setAttributes(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::setCalledFunction(), llvm::Function::setCallingConv(), llvm::LandingPadInst::setCleanup(), llvm::GlobalObject::setComdat(), llvm::Instruction::setDebugLoc(), llvm::GlobalValue::setDLLStorageClass(), llvm::Instruction::setFastMathFlags(), llvm::Function::setGC(), llvm::Function::setIsMaterializable(), llvm::GlobalValue::setLinkage(), llvm::GlobalValueSummary::setModulePath(), llvm::GlobalValueSummary::setOriginalName(), llvm::Function::setPersonalityFn(), llvm::GlobalObject::setSection(), llvm::Comdat::setSelectionKind(), llvm::Function::setSubprogram(), llvm::AllocaInst::setSwiftError(), llvm::GlobalValue::setThreadLocalMode(), llvm::GlobalValue::setUnnamedAddr(), llvm::AllocaInst::setUsedWithInAlloca(), llvm::GlobalValue::setVisibility(), SI, llvm::SyncScope::SingleThread, llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::ArrayRef< T >::size(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, llvm::BitstreamCursor::SkipBlock(), llvm::Value::sortUseList(), llvm::StripDebugInfo(), llvm::stripDebugInfo(), stripTBAA(), llvm::BitstreamEntry::SubBlock, llvm::Type::subtypes(), llvm::Error::success(), std::swap(), llvm::bitc::SYNC_SCOPE_NAMES_BLOCK_ID, llvm::SyncScope::System, llvm::Expected< T >::takeError(), llvm::CallInst::TCK_MustTail, llvm::CallInst::TCK_None, llvm::CallInst::TCK_NoTail, llvm::CallInst::TCK_Tail, TLM, llvm::transform(), llvm::bitc::TYPE_BLOCK_ID_NEW, llvm::APInt::ule(), llvm::CalleeInfo::Unknown, llvm::Unordered, llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeDebugInfo(), upgradeDLLImportExportLinkage(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeIntrinsicFunction(), llvm::UpgradeModuleFlags(), llvm::bitc::USELIST_BLOCK_ID, llvm::bitc::USELIST_CODE_BB, llvm::bitc::USELIST_CODE_DEFAULT, llvm::bitc::VALUE_SYMTAB_BLOCK_ID, llvm::IndexedInstrProf::Version, VI, Visibility, llvm::bitc::VST_CODE_COMBINED_ENTRY, llvm::bitc::VST_CODE_ENTRY, llvm::bitc::VST_CODE_FNENTRY, and llvm::APFloatBase::x87DoubleExtended().

◆ stripTBAA()

static void stripTBAA ( Module M)
static

Definition at line 155 of file BitcodeReader.cpp.

References F(), I, llvm::instructions(), and llvm::LLVMContext::MD_tbaa.

Referenced by readWideAPInt().

◆ upgradeDLLImportExportLinkage()

static void upgradeDLLImportExportLinkage ( GlobalValue GV,
unsigned  Val 
)
static

Variable Documentation

◆ ErrorCategory

ManagedStatic<BitcodeErrorCategoryType> ErrorCategory
static

Definition at line 5431 of file BitcodeReader.cpp.

Referenced by llvm::BitcodeErrorCategory().

◆ PrintSummaryGUIDs

cl::opt<bool> PrintSummaryGUIDs("print-summary-global-ids", cl::init(false), cl::Hidden, cl::desc( "Print the global id for each value when reading the module summary"))
static

Referenced by readWideAPInt().