|
LLVM
3.7.0
|
#include "llvm/Bitcode/ReaderWriter.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Triple.h"#include "llvm/Bitcode/BitstreamReader.h"#include "llvm/Bitcode/LLVMBitCodes.h"#include "llvm/IR/AutoUpgrade.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DebugInfo.h"#include "llvm/IR/DebugInfoMetadata.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/DiagnosticPrinter.h"#include "llvm/IR/GVMaterializer.h"#include "llvm/IR/InlineAsm.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/Module.h"#include "llvm/IR/OperandTraits.h"#include "llvm/IR/Operator.h"#include "llvm/IR/ValueHandle.h"#include "llvm/Support/DataStream.h"#include "llvm/Support/ManagedStatic.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/MemoryBuffer.h"#include "llvm/Support/raw_ostream.h"#include <deque>Go to the source code of this file.
Classes | |
| struct | llvm::OperandTraits< ConstantPlaceHolder > |
Namespaces | |
| llvm | |
| Compute iterated dominance frontiers using a linear time algorithm. | |
Macros | |
| #define | GET_OR_DISTINCT(CLASS, DISTINCT, ARGS) (DISTINCT ? CLASS::getDistinct ARGS : CLASS::get ARGS) |
Enumerations | |
| enum | |
Functions | |
| static std::error_code | error (DiagnosticHandlerFunction DiagnosticHandler, std::error_code EC, const Twine &Message) |
| static std::error_code | error (DiagnosticHandlerFunction DiagnosticHandler, std::error_code EC) |
| static std::error_code | error (DiagnosticHandlerFunction DiagnosticHandler, const Twine &Message) |
| static DiagnosticHandlerFunction | getDiagHandler (DiagnosticHandlerFunction F, LLVMContext &C) |
| 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 bool | hasImplicitComdat (size_t Val) |
| static GlobalValue::LinkageTypes | getDecodedLinkage (unsigned Val) |
| static GlobalValue::VisibilityTypes | getDecodedVisibility (unsigned Val) |
| static GlobalValue::DLLStorageClassTypes | getDecodedDLLStorageClass (unsigned Val) |
| static GlobalVariable::ThreadLocalMode | getDecodedThreadLocalMode (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 SynchronizationScope | getDecodedSynchScope (unsigned Val) |
| static Comdat::SelectionKind | getDecodedComdatSelectionKind (unsigned Val) |
| static FastMathFlags | getDecodedFastMathFlags (unsigned Val) |
| static void | upgradeDLLImportExportLinkage (llvm::GlobalValue *GV, unsigned 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 int64_t | unrotateSign (uint64_t U) |
| static APInt | readWideAPInt (ArrayRef< uint64_t > Vals, unsigned TypeBits) |
| static std::error_code | typeCheckLoadStoreInst (DiagnosticHandlerFunction DH, Type *ValType, Type *PtrType) |
| static ErrorOr < std::unique_ptr< Module > > | getBitcodeModuleImpl (std::unique_ptr< DataStreamer > Streamer, StringRef Name, BitcodeReader *R, LLVMContext &Context, bool MaterializeAll, bool ShouldLazyLoadMetadata) |
| static ErrorOr < std::unique_ptr< Module > > | getLazyBitcodeModuleImpl (std::unique_ptr< MemoryBuffer > &&Buffer, LLVMContext &Context, bool MaterializeAll, DiagnosticHandlerFunction DiagnosticHandler, bool ShouldLazyLoadMetadata=false) |
| Get a lazy one-at-time loading module from bitcode. More... | |
Variables | |
| static ManagedStatic < BitcodeErrorCategoryType > | ErrorCategory |
| #define GET_OR_DISTINCT | ( | CLASS, | |
| DISTINCT, | |||
| ARGS | |||
| ) | (DISTINCT ? CLASS::getDistinct ARGS : CLASS::get ARGS) |
| anonymous enum |
Definition at line 40 of file BitcodeReader.cpp.
|
static |
Convert a string from a record into an std::string, return true on failure.
Definition at line 495 of file BitcodeReader.cpp.
References llvm::ArrayRef< T >::size().
|
static |
This fills an AttrBuilder object with the LLVM attributes that have been decoded from the given integer.
This function must stay in sync with 'encodeLLVMAttributesForBitcode'.
Definition at line 1010 of file BitcodeReader.cpp.
References llvm::AttrBuilder::addAlignmentAttr(), llvm::AttrBuilder::addRawValue(), and llvm::isPowerOf2_32().
|
static |
Definition at line 388 of file BitcodeReader.cpp.
References llvm::DI, and llvm::DS_Error.
Referenced by error(), llvm::IndexedInstrProfReader::getFunctionCounts(), llvm::GCModuleInfo::getGCStrategy(), getInt(), llvm::Regex::isValid(), llvm::llvm_execute_on_thread(), LLVMTargetMachineEmit(), llvm::Regex::match(), llvm::RawInstrProfReader< IntPtrT >::readHeader(), llvm::IndexedInstrProfReader::readHeader(), llvm::RawInstrProfReader< IntPtrT >::readNextRecord(), llvm::IndexedInstrProfReader::readNextRecord(), llvm::Regex::Regex(), and typeCheckLoadStoreInst().
|
static |
Definition at line 395 of file BitcodeReader.cpp.
References error().
|
static |
Definition at line 400 of file BitcodeReader.cpp.
References llvm::CorruptedBitcode, error(), and llvm::make_error_code().
|
static |
Definition at line 1085 of file BitcodeReader.cpp.
References llvm::bitc::ATTR_KIND_ALIGNMENT, 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_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_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_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_STRUCT_RET, llvm::bitc::ATTR_KIND_UW_TABLE, llvm::bitc::ATTR_KIND_Z_EXT, llvm::CallingConv::Cold, llvm::MCID::Convergent, llvm::ISD::JumpTable, llvm::NoAlias, and llvm::None.
|
static |
Definition at line 4654 of file BitcodeReader.cpp.
References llvm::Module::setMaterializer().
Referenced by getLazyBitcodeModuleImpl(), and llvm::getStreamedBitcodeModule().
Definition at line 608 of file BitcodeReader.cpp.
References llvm::APIntOps::And(), llvm::bitc::BINOP_ADD, llvm::bitc::BINOP_AND, llvm::bitc::BINOP_ASHR, llvm::bitc::BINOP_LSHR, llvm::bitc::BINOP_MUL, llvm::bitc::BINOP_OR, llvm::bitc::BINOP_SDIV, llvm::bitc::BINOP_SHL, llvm::bitc::BINOP_SREM, llvm::bitc::BINOP_SUB, llvm::bitc::BINOP_UDIV, llvm::bitc::BINOP_UREM, llvm::bitc::BINOP_XOR, llvm::Type::isFPOrFPVectorTy(), llvm::Type::isIntOrIntVectorTy(), llvm::APIntOps::Or(), and llvm::APIntOps::Xor().
Definition at line 589 of file BitcodeReader.cpp.
References llvm::bitc::CAST_ADDRSPACECAST, llvm::bitc::CAST_BITCAST, llvm::bitc::CAST_FPEXT, llvm::bitc::CAST_FPTOSI, llvm::bitc::CAST_FPTOUI, llvm::bitc::CAST_FPTRUNC, llvm::bitc::CAST_INTTOPTR, llvm::bitc::CAST_PTRTOINT, llvm::bitc::CAST_SEXT, llvm::bitc::CAST_SITOFP, llvm::bitc::CAST_TRUNC, llvm::bitc::CAST_UITOFP, and llvm::bitc::CAST_ZEXT.
|
static |
Definition at line 684 of file BitcodeReader.cpp.
References llvm::SystemZICMP::Any, llvm::bitc::COMDAT_SELECTION_KIND_ANY, llvm::bitc::COMDAT_SELECTION_KIND_EXACT_MATCH, llvm::bitc::COMDAT_SELECTION_KIND_LARGEST, llvm::bitc::COMDAT_SELECTION_KIND_NO_DUPLICATES, and llvm::bitc::COMDAT_SELECTION_KIND_SAME_SIZE.
|
static |
Definition at line 569 of file BitcodeReader.cpp.
|
static |
Definition at line 700 of file BitcodeReader.cpp.
References llvm::FastMathFlags::setAllowReciprocal(), llvm::FastMathFlags::setNoInfs(), llvm::FastMathFlags::setNoNaNs(), llvm::FastMathFlags::setNoSignedZeros(), and llvm::FastMathFlags::setUnsafeAlgebra().
|
static |
Definition at line 517 of file BitcodeReader.cpp.
|
static |
Definition at line 663 of file BitcodeReader.cpp.
References llvm::Acquire, llvm::AcquireRelease, llvm::Monotonic, llvm::NotAtomic, llvm::bitc::ORDERING_ACQREL, llvm::bitc::ORDERING_ACQUIRE, llvm::bitc::ORDERING_MONOTONIC, llvm::bitc::ORDERING_NOTATOMIC, llvm::bitc::ORDERING_RELEASE, llvm::bitc::ORDERING_SEQCST, llvm::bitc::ORDERING_UNORDERED, llvm::Release, llvm::SequentiallyConsistent, and llvm::Unordered.
|
static |
Definition at line 646 of file BitcodeReader.cpp.
References llvm::APIntOps::And(), llvm::APIntOps::Or(), llvm::bitc::RMW_ADD, llvm::bitc::RMW_AND, llvm::bitc::RMW_MAX, llvm::bitc::RMW_MIN, llvm::bitc::RMW_NAND, llvm::bitc::RMW_OR, llvm::bitc::RMW_SUB, llvm::bitc::RMW_UMAX, llvm::bitc::RMW_UMIN, llvm::bitc::RMW_XCHG, llvm::bitc::RMW_XOR, and llvm::APIntOps::Xor().
|
static |
Definition at line 676 of file BitcodeReader.cpp.
References llvm::CrossThread, llvm::SingleThread, llvm::bitc::SYNCHSCOPE_CROSSTHREAD, and llvm::bitc::SYNCHSCOPE_SINGLETHREAD.
|
static |
Definition at line 578 of file BitcodeReader.cpp.
|
static |
Definition at line 559 of file BitcodeReader.cpp.
|
static |
Definition at line 419 of file BitcodeReader.cpp.
References llvm::DI, llvm::LLVMContext::diagnose(), and F().
|
static |
Get a lazy one-at-time loading module from bitcode.
This isn't always used in a lazy context. In particular, it's also used by parseBitcodeFile(). If this is truly lazy, then we need to eagerly pull in forward-referenced functions from block address references.
| [in] | MaterializeAll | Set to true if we should materialize everything. |
Definition at line 4691 of file BitcodeReader.cpp.
References getBitcodeModuleImpl(), and llvm::MipsISD::Ret.
Referenced by llvm::getLazyBitcodeModule(), and llvm::parseBitcodeFile().
|
static |
Definition at line 505 of file BitcodeReader.cpp.
Definition at line 2143 of file BitcodeReader.cpp.
References llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), and llvm::ArrayRef< T >::size().
|
static |
Definition at line 3306 of file BitcodeReader.cpp.
References error().
|
static |
Definition at line 1591 of file BitcodeReader.cpp.
|
static |
Definition at line 715 of file BitcodeReader.cpp.
References llvm::GlobalValue::setDLLStorageClass().
|
static |
Definition at line 4643 of file BitcodeReader.cpp.
Referenced by llvm::BitcodeErrorCategory().
1.8.6