LLVM
8.0.1
|
#include "llvm/Bitcode/BitcodeWriter.h"
#include "ValueEnumerator.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Bitcode/BitCodes.h"
#include "llvm/Bitcode/BitstreamWriter.h"
#include "llvm/Bitcode/LLVMBitCodes.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Comdat.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalIFunc.h"
#include "llvm/IR/GlobalObject.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.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/UseListOrder.h"
#include "llvm/IR/Value.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Object/IRSymtab.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SHA1.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "llvm/IR/Metadata.def"
Go to the source code of this file.
Macros | |
#define | HANDLE_MDNODE_LEAF(CLASS) CLASS##AbbrevID, |
#define | HANDLE_MDNODE_LEAF(CLASS) unsigned CLASS##Abbrev = 0; |
#define | HANDLE_MDNODE_LEAF(CLASS) |
Enumerations | |
enum | |
These are manifest constants used by the bitcode writer. More... | |
enum | StringEncoding { SE_Char6, SE_Fixed7, SE_Fixed8 } |
enum | MetadataAbbrev : unsigned { LastPlusOne } |
Functions | |
static unsigned | getEncodedCastOpcode (unsigned Opcode) |
static unsigned | getEncodedUnaryOpcode (unsigned Opcode) |
static unsigned | getEncodedBinaryOpcode (unsigned Opcode) |
static unsigned | getEncodedRMWOperation (AtomicRMWInst::BinOp Op) |
static unsigned | getEncodedOrdering (AtomicOrdering Ordering) |
static void | writeStringRecord (BitstreamWriter &Stream, unsigned Code, StringRef Str, unsigned AbbrevToUse) |
static uint64_t | getAttrKindEncoding (Attribute::AttrKind Kind) |
static unsigned | getEncodedLinkage (const GlobalValue::LinkageTypes Linkage) |
static unsigned | getEncodedLinkage (const GlobalValue &GV) |
static uint64_t | getEncodedFFlags (FunctionSummary::FFlags Flags) |
static uint64_t | getEncodedGVSummaryFlags (GlobalValueSummary::GVFlags Flags) |
static uint64_t | getEncodedGVarFlags (GlobalVarSummary::GVarFlags Flags) |
static unsigned | getEncodedVisibility (const GlobalValue &GV) |
static unsigned | getEncodedDLLStorageClass (const GlobalValue &GV) |
static unsigned | getEncodedThreadLocalMode (const GlobalValue &GV) |
static unsigned | getEncodedComdatSelectionKind (const Comdat &C) |
static unsigned | getEncodedUnnamedAddr (const GlobalValue &GV) |
static StringEncoding | getStringEncoding (StringRef Str) |
Determine the encoding to use for the given string name and length. More... | |
static uint64_t | getOptimizationFlags (const Value *V) |
static uint64_t | rotateSign (int64_t I) |
static void | emitSignedInt64 (SmallVectorImpl< uint64_t > &Vals, uint64_t V) |
static void | writeFunctionTypeMetadataRecords (BitstreamWriter &Stream, FunctionSummary *FS) |
Write the function type metadata related records that need to appear before a function summary entry (whether per-module or combined). More... | |
static void | getReferencedTypeIds (FunctionSummary *FS, std::set< GlobalValue::GUID > &ReferencedTypeIds) |
Collect type IDs from type tests used by function. More... | |
static void | writeWholeProgramDevirtResolutionByArg (SmallVector< uint64_t, 64 > &NameVals, const std::vector< uint64_t > &args, const WholeProgramDevirtResolution::ByArg &ByArg) |
static void | writeWholeProgramDevirtResolution (SmallVector< uint64_t, 64 > &NameVals, StringTableBuilder &StrtabBuilder, uint64_t Id, const WholeProgramDevirtResolution &Wpd) |
static void | writeTypeIdSummaryRecord (SmallVector< uint64_t, 64 > &NameVals, StringTableBuilder &StrtabBuilder, const std::string &Id, const TypeIdSummary &Summary) |
static void | writeIdentificationBlock (BitstreamWriter &Stream) |
Create the "IDENTIFICATION_BLOCK_ID" containing a single string with the current llvm version, and a record for the epoch number. More... | |
static void | writeInt32ToBuffer (uint32_t Value, SmallVectorImpl< char > &Buffer, uint32_t &Position) |
static void | emitDarwinBCHeaderAndTrailer (SmallVectorImpl< char > &Buffer, const Triple &TT) |
If generating a bc file on darwin, we have to emit a header and trailer to make it compatible with the system archiver. More... | |
static void | writeBitcodeHeader (BitstreamWriter &Stream) |
Helper to write the header common to all bitcode files. More... | |
Variables | |
static cl::opt< unsigned > | IndexThreshold ("bitcode-mdindex-threshold", cl::Hidden, cl::init(25), cl::desc("Number of metadatas above which we emit an index " "to enable lazy-loading")) |
cl::opt< bool > | WriteRelBFToSummary ("write-relbf-to-summary", cl::Hidden, cl::init(false), cl::desc("Write relative block frequency to function summary ")) |
FunctionSummary::ForceSummaryHotnessType | ForceSummaryEdgesCold |
static const uint64_t | INDEX_VERSION = 6 |
#define HANDLE_MDNODE_LEAF | ( | CLASS | ) | CLASS##AbbrevID, |
Definition at line 1951 of file BitcodeWriter.cpp.
#define HANDLE_MDNODE_LEAF | ( | CLASS | ) | unsigned CLASS##Abbrev = 0; |
Definition at line 1951 of file BitcodeWriter.cpp.
#define HANDLE_MDNODE_LEAF | ( | CLASS | ) |
Definition at line 1951 of file BitcodeWriter.cpp.
anonymous enum |
These are manifest constants used by the bitcode writer.
They do not need to be kept in sync with the reader, but need to be consistent within this file.
Definition at line 100 of file BitcodeWriter.cpp.
enum MetadataAbbrev : unsigned |
Enumerator | |
---|---|
LastPlusOne |
Definition at line 1950 of file BitcodeWriter.cpp.
enum StringEncoding |
Enumerator | |
---|---|
SE_Char6 | |
SE_Fixed7 | |
SE_Fixed8 |
Definition at line 1106 of file BitcodeWriter.cpp.
|
static |
If generating a bc file on darwin, we have to emit a header and trailer to make it compatible with the system archiver.
To do this we emit the following header, and then emit a trailer that pads the file out to be a multiple of 16 bytes.
struct bc_header { uint32_t Magic; // 0x0B17C0DE uint32_t Version; // Version, currently always 0. uint32_t BitcodeOffset; // Offset to traditional bitcode file. uint32_t BitcodeSize; // Size of traditional bitcode file. uint32_t CPUType; // CPU specifier. ... potentially more later ... };
Definition at line 4126 of file BitcodeWriter.cpp.
References llvm::Triple::arm, assert(), llvm::BWH_HeaderSize, llvm::Triple::getArch(), llvm::Triple::ppc, llvm::Triple::ppc64, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorBase::size(), llvm::Triple::thumb, writeInt32ToBuffer(), llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::WriteBitcodeToFile().
|
static |
Definition at line 2211 of file BitcodeWriter.cpp.
References llvm::any_of(), llvm::SmallVectorImpl< T >::append(), llvm::BitCodeAbbrevOp::Array, assert(), llvm::SmallVectorImpl< T >::assign(), llvm::BitstreamWriter::BackpatchWord(), llvm::StringRef::begin(), llvm::Function::begin(), llvm::tgtok::Bits, C, llvm::MCID::Call, 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::SwitchInst::cases(), llvm::LandingPadInst::Catch, llvm::BitCodeAbbrevOp::Char6, llvm::SmallVectorImpl< T >::clear(), llvm::ValueEnumerator::computeBitsRequiredForTypeIndicies(), llvm::bitc::CONSTANTS_BLOCK_ID, 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_CE_UNOP, llvm::bitc::CST_CODE_CSTRING, llvm::bitc::CST_CODE_DATA, llvm::bitc::CST_CODE_FLOAT, llvm::bitc::CST_CODE_INLINEASM, 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::Value::dump(), E, llvm::BitstreamWriter::EmitAbbrev(), llvm::BitstreamWriter::EmitBlockInfoAbbrev(), llvm::BitstreamWriter::EmitRecord(), llvm::ValueSymbolTable::empty(), llvm::StringRef::end(), llvm::Function::end(), llvm::BitstreamWriter::EnterBlockInfoBlock(), llvm::BitstreamWriter::EnterSubblock(), llvm::BitstreamWriter::ExitBlock(), F(), llvm::LandingPadInst::Filter, first, llvm::BitCodeAbbrevOp::Fixed, 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_CMP2, llvm::bitc::FUNC_CODE_INST_CMPXCHG, 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_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_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_SHUFFLEVEC, llvm::bitc::FUNC_CODE_INST_STORE, llvm::bitc::FUNC_CODE_INST_STOREATOMIC, llvm::bitc::FUNC_CODE_INST_SWITCH, llvm::bitc::FUNC_CODE_INST_UNOP, 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::AllocaInst::getAlignment(), getAlignment(), llvm::AllocaInst::getAllocatedType(), llvm::CallBase::getArgOperand(), llvm::ValueEnumerator::getAttributeListID(), llvm::CallBase::getAttributes(), llvm::ValueEnumerator::getBasicBlocks(), llvm::CallBase::getCalledValue(), llvm::CallBase::getCallingConv(), llvm::LandingPadInst::getClause(), llvm::BranchInst::getCondition(), llvm::SwitchInst::getCondition(), llvm::Value::getContext(), llvm::BitstreamWriter::GetCurrentBitNo(), llvm::Instruction::getDebugLoc(), llvm::SwitchInst::getDefaultDest(), llvm::ConstantDataSequential::getElementAsInteger(), getEncodedBinaryOpcode(), getEncodedCastOpcode(), getEncodedOrdering(), getEncodedRMWOperation(), getEncodedUnaryOpcode(), llvm::ValueEnumerator::getFunctionConstantRange(), llvm::CallBase::getFunctionType(), llvm::ValueEnumerator::getGlobalBasicBlockID(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::ValueEnumerator::getMetadataOrNullID(), llvm::InvokeInst::getNormalDest(), llvm::CallBase::getNumArgOperands(), llvm::LandingPadInst::getNumClauses(), llvm::ConstantDataSequential::getNumElements(), llvm::PHINode::getNumIncomingValues(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getNumOperandBundles(), llvm::User::getNumOperands(), llvm::FunctionType::getNumParams(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getOperandBundleAt(), llvm::LLVMContext::getOperandBundleTagID(), getOptimizationFlags(), llvm::PPC::getPredicate(), llvm::APInt::getRawData(), getStringEncoding(), llvm::BranchInst::getSuccessor(), llvm::Value::getType(), llvm::ValueEnumerator::getTypeID(), llvm::ValueEnumerator::getTypes(), llvm::InvokeInst::getUnwindDest(), llvm::ValueEnumerator::getValueID(), llvm::ValueEnumerator::getValues(), llvm::Function::getValueSymbolTable(), H, llvm::GlobalObject::hasMetadata(), llvm::Instruction::hasMetadataOtherThanDebugLoc(), llvm::CallBase::hasOperandBundles(), I, llvm::ValueEnumerator::incorporateFunction(), isAtomic(), llvm::Instruction::isCast(), llvm::LandingPadInst::isCatch(), llvm::BitCodeAbbrevOp::isChar6(), llvm::LandingPadInst::isCleanup(), llvm::BranchInst::isConditional(), llvm::ConstantDataSequential::isCString(), llvm::GlobalValue::isDeclaration(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isFP128Ty(), llvm::Type::isHalfTy(), llvm::CallInst::isMustTailCall(), llvm::CallInst::isNoTailCall(), llvm::Constant::isNullValue(), llvm::Type::isPPC_FP128Ty(), llvm::AllocaInst::isSwiftError(), llvm::CallInst::isTailCall(), llvm::AllocaInst::isUsedWithInAlloca(), llvm::FunctionType::isVarArg(), llvm::Type::isVoidTy(), isVolatile(), isWeak(), llvm::Type::isX86_FP80Ty(), llvm_unreachable, llvm::SPII::Load, llvm::Log2_32(), llvm::Log2_32_Ceil(), llvm::Value::MaximumAlignment, llvm::bitc::MODULE_STRTAB_BLOCK_ID, llvm::bitc::MST_CODE_ENTRY, llvm::bitc::MST_CODE_HASH, Name, llvm::User::operands(), P, llvm::ValueEnumerator::purgeFunction(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MipsISD::Ret, SE_Char6, SE_Fixed7, llvm::MCID::Select, llvm::ValueEnumerator::setInstructionID(), llvm::ValueEnumerator::shouldPreserveUseListOrder(), SI, llvm::SPII::Store, llvm::bitc::USELIST_BLOCK_ID, llvm::bitc::USELIST_CODE_BB, llvm::bitc::USELIST_CODE_DEFAULT, llvm::ValueEnumerator::UseListOrders, llvm::bitc::VALUE_SYMTAB_BLOCK_ID, llvm::BitCodeAbbrevOp::VBR, llvm::bitc::VST_CODE_BBENTRY, llvm::bitc::VST_CODE_ENTRY, and llvm::bitc::VST_CODE_FNENTRY.
|
static |
Definition at line 594 of file BitcodeWriter.cpp.
References llvm::AArch64CC::AL, llvm::Attribute::Alignment, llvm::Attribute::AllocSize, llvm::Attribute::AlwaysInline, llvm::SmallVectorImpl< T >::append(), llvm::Attribute::ArgMemOnly, llvm::BitCodeAbbrevOp::Array, llvm::Type::ArrayTyID, 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_NOCF_CHECK, llvm::bitc::ATTR_KIND_NON_LAZY_BIND, llvm::bitc::ATTR_KIND_NON_NULL, llvm::bitc::ATTR_KIND_OPT_FOR_FUZZING, 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_HWADDRESS, llvm::bitc::ATTR_KIND_SANITIZE_MEMORY, llvm::bitc::ATTR_KIND_SANITIZE_THREAD, llvm::bitc::ATTR_KIND_SHADOWCALLSTACK, llvm::bitc::ATTR_KIND_SPECULATABLE, llvm::bitc::ATTR_KIND_SPECULATIVE_LOAD_HARDENING, 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, llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, llvm::StringRef::begin(), llvm::Attribute::Builtin, llvm::Attribute::ByVal, llvm::BitCodeAbbrevOp::Char6, llvm::SmallVectorImpl< T >::clear(), llvm::Attribute::Cold, llvm::ValueEnumerator::computeBitsRequiredForTypeIndicies(), llvm::Attribute::Convergent, llvm::Attribute::Dereferenceable, llvm::Attribute::DereferenceableOrNull, llvm::Type::DoubleTyID, E, llvm::StructType::element_begin(), llvm::StructType::element_end(), llvm::BitstreamWriter::EmitAbbrev(), llvm::BitstreamWriter::EmitRecord(), llvm::StringRef::empty(), llvm::StringRef::end(), llvm::Attribute::EndAttrKinds, llvm::BitstreamWriter::EnterSubblock(), llvm::BitstreamWriter::ExitBlock(), llvm::BitCodeAbbrevOp::Fixed, llvm::Type::FloatTyID, llvm::Type::FP128TyID, llvm::Type::FunctionTyID, llvm::PointerType::getAddressSpace(), llvm::ValueEnumerator::getAttributeGroupID(), llvm::ValueEnumerator::getAttributeGroups(), llvm::ValueEnumerator::getAttributeLists(), llvm::AttributeList::getAttributes(), getBitWidth(), llvm::SequentialType::getElementType(), llvm::PointerType::getElementType(), llvm::StructType::getName(), llvm::SequentialType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::Type::getTypeID(), llvm::ValueEnumerator::getTypeID(), llvm::ValueEnumerator::getTypes(), llvm::Type::HalfTyID, llvm::AttributeSet::hasAttributes(), I, llvm::Attribute::InaccessibleMemOnly, llvm::Attribute::InaccessibleMemOrArgMemOnly, llvm::Attribute::InAlloca, llvm::AttributeList::index_begin(), llvm::AttributeList::index_end(), llvm::Attribute::InlineHint, llvm::Attribute::InReg, llvm::Type::IntegerTyID, llvm::StructType::isLiteral(), llvm::StructType::isOpaque(), llvm::StructType::isPacked(), llvm::FunctionType::isVarArg(), llvm::Attribute::JumpTable, Kind, llvm::Type::LabelTyID, llvm_unreachable, llvm::Type::MetadataTyID, llvm::Attribute::MinSize, llvm::Attribute::Naked, llvm::Attribute::Nest, llvm::Attribute::NoAlias, llvm::Attribute::NoBuiltin, llvm::Attribute::NoCapture, llvm::Attribute::NoCfCheck, llvm::Attribute::NoDuplicate, llvm::Attribute::NoImplicitFloat, llvm::Attribute::NoInline, llvm::Attribute::None, llvm::Attribute::NonLazyBind, llvm::Attribute::NonNull, llvm::Attribute::NoRecurse, llvm::Attribute::NoRedZone, llvm::Attribute::NoReturn, llvm::Attribute::NoUnwind, llvm::Attribute::OptForFuzzing, llvm::Attribute::OptimizeForSize, llvm::Attribute::OptimizeNone, llvm::bitc::PARAMATTR_BLOCK_ID, llvm::bitc::PARAMATTR_CODE_ENTRY, llvm::bitc::PARAMATTR_GROUP_BLOCK_ID, llvm::bitc::PARAMATTR_GRP_CODE_ENTRY, llvm::Type::PointerTyID, llvm::Type::PPC_FP128TyID, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::Attribute::ReadNone, llvm::Attribute::ReadOnly, llvm::Attribute::Returned, llvm::Attribute::ReturnsTwice, llvm::Attribute::SafeStack, llvm::Attribute::SanitizeAddress, llvm::Attribute::SanitizeHWAddress, llvm::Attribute::SanitizeMemory, llvm::Attribute::SanitizeThread, llvm::Attribute::SExt, llvm::Attribute::ShadowCallStack, llvm::Attribute::Speculatable, llvm::Attribute::SpeculativeLoadHardening, llvm::ARM_MB::ST, llvm::Attribute::StackAlignment, llvm::Attribute::StackProtect, llvm::Attribute::StackProtectReq, llvm::Attribute::StackProtectStrong, llvm::Attribute::StrictFP, llvm::Attribute::StructRet, llvm::Type::StructTyID, llvm::Attribute::SwiftError, llvm::Attribute::SwiftSelf, T, llvm::Type::TokenTyID, 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_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, llvm::Attribute::UWTable, llvm::BitCodeAbbrevOp::VBR, llvm::Type::VectorTyID, llvm::Type::VoidTyID, llvm::Attribute::WriteOnly, writeStringRecord(), llvm::Type::X86_FP80TyID, llvm::Type::X86_MMXTyID, and llvm::Attribute::ZExt.
Definition at line 525 of file BitcodeWriter.cpp.
References llvm::MCID::Add, 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, and llvm_unreachable.
Referenced by emitSignedInt64().
Definition at line 499 of file BitcodeWriter.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, llvm::bitc::CAST_ZEXT, and llvm_unreachable.
Referenced by emitSignedInt64().
Definition at line 1037 of file BitcodeWriter.cpp.
References llvm::Comdat::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, llvm::bitc::COMDAT_SELECTION_KIND_SAME_SIZE, llvm::Comdat::ExactMatch, llvm::Comdat::getSelectionKind(), llvm::Comdat::Largest, llvm_unreachable, llvm::Comdat::NoDuplicates, and llvm::Comdat::SameSize.
Referenced by getEncodedUnnamedAddr().
|
static |
Definition at line 1017 of file BitcodeWriter.cpp.
References llvm::GlobalValue::DefaultStorageClass, llvm::GlobalValue::DLLExportStorageClass, llvm::GlobalValue::DLLImportStorageClass, llvm::GlobalValue::getDLLStorageClass(), and llvm_unreachable.
Referenced by getStringEncoding().
|
static |
Definition at line 977 of file BitcodeWriter.cpp.
References llvm::FunctionSummary::FFlags::NoInline, llvm::FunctionSummary::FFlags::NoRecurse, llvm::FunctionSummary::FFlags::ReadNone, llvm::FunctionSummary::FFlags::ReadOnly, and llvm::FunctionSummary::FFlags::ReturnDoesNotAlias.
Referenced by writeTypeIdSummaryRecord().
|
static |
Definition at line 1003 of file BitcodeWriter.cpp.
References llvm::GlobalVarSummary::GVarFlags::ReadOnly.
Referenced by writeTypeIdSummaryRecord().
|
static |
Definition at line 988 of file BitcodeWriter.cpp.
References llvm::GlobalValueSummary::GVFlags::DSOLocal, llvm::GlobalValueSummary::GVFlags::Linkage, llvm::GlobalValueSummary::GVFlags::Live, and llvm::GlobalValueSummary::GVFlags::NotEligibleToImport.
Referenced by writeTypeIdSummaryRecord().
|
static |
Definition at line 945 of file BitcodeWriter.cpp.
References llvm::GlobalValue::AppendingLinkage, llvm::GlobalValue::AvailableExternallyLinkage, llvm::GlobalValue::CommonLinkage, llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, llvm_unreachable, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.
Referenced by getEncodedLinkage(), getStringEncoding(), and llvm::WriteIndexToFile().
|
static |
Definition at line 973 of file BitcodeWriter.cpp.
References getEncodedLinkage(), and llvm::GlobalValue::getLinkage().
|
static |
Definition at line 566 of file BitcodeWriter.cpp.
References llvm::Acquire, llvm::AcquireRelease, llvm_unreachable, 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.
Referenced by emitSignedInt64().
|
static |
Definition at line 549 of file BitcodeWriter.cpp.
References llvm::AtomicRMWInst::Add, llvm::AtomicRMWInst::And, llvm_unreachable, llvm::AtomicRMWInst::Max, llvm::AtomicRMWInst::Min, llvm::AtomicRMWInst::Nand, llvm::AtomicRMWInst::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, llvm::AtomicRMWInst::Sub, llvm::AtomicRMWInst::UMax, llvm::AtomicRMWInst::UMin, llvm::AtomicRMWInst::Xchg, and llvm::AtomicRMWInst::Xor.
Referenced by emitSignedInt64().
|
static |
Definition at line 1026 of file BitcodeWriter.cpp.
References llvm::GlobalValue::GeneralDynamicTLSModel, llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::InitialExecTLSModel, llvm_unreachable, llvm::GlobalValue::LocalDynamicTLSModel, llvm::GlobalValue::LocalExecTLSModel, and llvm::GlobalValue::NotThreadLocal.
Referenced by getStringEncoding().
Definition at line 518 of file BitcodeWriter.cpp.
References llvm_unreachable, and llvm::bitc::UNOP_NEG.
Referenced by emitSignedInt64().
|
static |
Definition at line 1053 of file BitcodeWriter.cpp.
References llvm::StringTableBuilder::add(), C, llvm::SmallVectorImpl< T >::clear(), llvm::BitstreamWriter::EmitAbbrev(), llvm::BitstreamWriter::EmitRecord(), llvm::BitstreamWriter::EmitRecordWithAbbrev(), llvm::BitCodeAbbrevOp::Fixed, llvm::ValueEnumerator::getComdats(), llvm::BitstreamWriter::GetCurrentBitNo(), getEncodedComdatSelectionKind(), llvm::Value::getName(), llvm::GlobalValue::getUnnamedAddr(), llvm::GlobalValue::Global, llvm_unreachable, llvm::GlobalValue::Local, llvm::bitc::MODULE_CODE_COMDAT, llvm::bitc::MODULE_CODE_VSTOFFSET, llvm::GlobalValue::None, llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::StringRef::size().
Referenced by getStringEncoding().
|
static |
Definition at line 1008 of file BitcodeWriter.cpp.
References llvm::GlobalValue::DefaultVisibility, llvm::GlobalValue::getVisibility(), llvm::GlobalValue::HiddenVisibility, llvm_unreachable, and llvm::GlobalValue::ProtectedVisibility.
Referenced by getStringEncoding().
Definition at line 1355 of file BitcodeWriter.cpp.
References llvm::bitc::AllowContract, llvm::bitc::AllowReassoc, llvm::bitc::AllowReciprocal, llvm::bitc::ApproxFunc, llvm::BitCodeAbbrevOp::Array, assert(), llvm::SmallVectorImpl< T >::clear(), llvm::BitstreamWriter::EmitAbbrev(), llvm::BitstreamWriter::EmitRecord(), llvm::BitCodeAbbrevOp::Fixed, llvm::ValueEnumerator::getMetadataID(), llvm::ValueEnumerator::getMetadataOrNullID(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::GenericDINode::getTag(), llvm::Value::getType(), llvm::ValueEnumerator::getTypeID(), llvm::ValueAsMetadata::getValue(), llvm::ValueEnumerator::getValueID(), I, llvm::MDNode::isDistinct(), llvm::bitc::METADATA_DISTINCT_NODE, llvm::bitc::METADATA_GENERIC_DEBUG, llvm::bitc::METADATA_LOCATION, llvm::bitc::METADATA_NODE, llvm::bitc::METADATA_VALUE, N, llvm::bitc::NoInfs, llvm::bitc::NoNaNs, llvm::bitc::NoSignedZeros, llvm::bitc::OBO_NO_SIGNED_WRAP, llvm::bitc::OBO_NO_UNSIGNED_WRAP, llvm::MDNode::operands(), llvm::bitc::PEO_EXACT, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::BitCodeAbbrevOp::VBR, writeDILocation(), writeGenericDINode(), and writeMDTuple().
Referenced by emitSignedInt64().
|
static |
Collect type IDs from type tests used by function.
Definition at line 3461 of file BitcodeWriter.cpp.
References llvm::FunctionSummary::type_checked_load_const_vcalls(), llvm::FunctionSummary::type_checked_load_vcalls(), llvm::FunctionSummary::type_test_assume_const_vcalls(), llvm::FunctionSummary::type_test_assume_vcalls(), llvm::FunctionSummary::type_tests(), and llvm::AArch64CC::VC.
|
static |
Determine the encoding to use for the given string name and length.
Definition at line 1109 of file BitcodeWriter.cpp.
References llvm::AArch64CC::AL, llvm::BitCodeAbbrevOp::Array, llvm::tgtok::Bits, C, llvm::BitCodeAbbrevOp::Char6, llvm::SmallVectorImpl< T >::clear(), llvm::GlobalValue::DefaultStorageClass, llvm::GlobalValue::DefaultVisibility, llvm::BitstreamWriter::EmitAbbrev(), llvm::BitstreamWriter::EmitRecord(), F(), llvm::BitCodeAbbrevOp::Fixed, llvm::AttributeList::FunctionIndex, llvm::ValueEnumerator::getAttributeListID(), llvm::ValueEnumerator::getComdatID(), llvm::Module::getDataLayoutStr(), getEncodedDLLStorageClass(), getEncodedLinkage(), getEncodedThreadLocalMode(), getEncodedUnnamedAddr(), getEncodedVisibility(), llvm::Module::getModuleInlineAsm(), llvm::Module::getTargetTriple(), llvm::ValueEnumerator::getTypeID(), llvm::ValueEnumerator::getValueID(), llvm::Module::globals(), I, llvm::BitCodeAbbrevOp::isChar6(), llvm::Log2_32(), llvm::Log2_32_Ceil(), llvm::max(), llvm::bitc::MODULE_CODE_ALIAS, llvm::bitc::MODULE_CODE_ASM, llvm::bitc::MODULE_CODE_DATALAYOUT, llvm::bitc::MODULE_CODE_FUNCTION, llvm::bitc::MODULE_CODE_GCNAME, llvm::bitc::MODULE_CODE_GLOBALVAR, llvm::bitc::MODULE_CODE_IFUNC, llvm::bitc::MODULE_CODE_SECTIONNAME, llvm::bitc::MODULE_CODE_SOURCE_FILENAME, llvm::bitc::MODULE_CODE_TRIPLE, llvm::GlobalValue::None, P, llvm::SmallVectorTemplateBase< T >::push_back(), SE_Char6, SE_Fixed7, SE_Fixed8, llvm::BitCodeAbbrevOp::VBR, and writeStringRecord().
Referenced by emitSignedInt64(), and llvm::WriteIndexToFile().
|
static |
Definition at line 1473 of file BitcodeWriter.cpp.
References llvm::SmallString< InternalLen >::append(), llvm::SmallVectorImpl< T >::append(), llvm::BitCodeAbbrevOp::Array, assert(), llvm::BitCodeAbbrevOp::Blob, llvm::StringRef::bytes_begin(), llvm::StringRef::bytes_end(), llvm::SmallVectorImpl< T >::clear(), llvm::DIExpression::elements_begin(), llvm::DIExpression::elements_end(), llvm::BitstreamWriter::EmitAbbrev(), llvm::BitstreamWriter::EmitRecord(), llvm::BitstreamWriter::EmitRecordWithBlob(), llvm::BitstreamWriter::EmitVBR(), llvm::ArrayRef< T >::empty(), llvm::BitCodeAbbrevOp::Fixed, llvm::BitstreamWriter::FlushToWord(), llvm::DITypeRefArray::get(), llvm::MDNode::get(), llvm::DIType::getAlignInBits(), llvm::DIVariable::getAlignInBits(), llvm::DILocalVariable::getArg(), llvm::DIObjCProperty::getAttributes(), llvm::DICompositeType::getBaseType(), llvm::DISubroutineType::getCC(), llvm::DILexicalBlock::getColumn(), llvm::DICompileUnit::getDebugInfoForProfiling(), llvm::DICompositeType::getDiscriminator(), llvm::DILexicalBlockFile::getDiscriminator(), llvm::DICompileUnit::getDWOId(), llvm::DICompositeType::getElements(), llvm::DIExpression::getElements(), llvm::DIMacroFile::getElements(), llvm::DICompileUnit::getEmissionKind(), llvm::DIBasicType::getEncoding(), llvm::DIImportedEntity::getEntity(), llvm::DICompileUnit::getEnumTypes(), llvm::DINamespace::getExportSymbols(), llvm::DIGlobalVariableExpression::getExpression(), llvm::DIScope::getFile(), llvm::DIVariable::getFile(), llvm::DILabel::getFile(), llvm::DIObjCProperty::getFile(), llvm::DIMacroFile::getFile(), llvm::DIType::getFlags(), llvm::DILocalVariable::getFlags(), llvm::DICompileUnit::getGlobalVariables(), llvm::DICompileUnit::getImportedEntities(), llvm::DIType::getLine(), llvm::DILexicalBlock::getLine(), llvm::DIVariable::getLine(), llvm::DILabel::getLine(), llvm::DIObjCProperty::getLine(), llvm::DIImportedEntity::getLine(), llvm::DIMacro::getLine(), llvm::DIMacroFile::getLine(), llvm::DIMacroNode::getMacinfoType(), llvm::DICompileUnit::getMacros(), llvm::ValueEnumerator::getMetadataID(), llvm::ValueEnumerator::getMetadataOrNullID(), llvm::DICompileUnit::getNameTableKind(), llvm::DIType::getOffsetInBits(), llvm::DIImportedEntity::getRawFile(), llvm::DICompileUnit::getRawFlags(), llvm::DIObjCProperty::getRawGetterName(), llvm::DICompositeType::getRawIdentifier(), llvm::DIGlobalVariable::getRawLinkageName(), llvm::DIEnumerator::getRawName(), llvm::DIType::getRawName(), llvm::DINamespace::getRawName(), llvm::DITemplateParameter::getRawName(), llvm::DIVariable::getRawName(), llvm::DILabel::getRawName(), llvm::DIObjCProperty::getRawName(), llvm::DIImportedEntity::getRawName(), llvm::DIMacro::getRawName(), llvm::DICompileUnit::getRawProducer(), llvm::DIObjCProperty::getRawSetterName(), llvm::DICompileUnit::getRawSplitDebugFilename(), llvm::DIMacro::getRawValue(), llvm::DICompileUnit::getRetainedTypes(), llvm::DICompositeType::getRuntimeLang(), llvm::DICompileUnit::getRuntimeVersion(), llvm::DIScope::getScope(), llvm::DIType::getScope(), llvm::DILexicalBlockBase::getScope(), llvm::DINamespace::getScope(), llvm::DIVariable::getScope(), llvm::DILocalVariable::getScope(), llvm::DILabel::getScope(), llvm::DIImportedEntity::getScope(), llvm::DIType::getSizeInBits(), llvm::DICompileUnit::getSourceLanguage(), llvm::DICompileUnit::getSplitDebugInlining(), llvm::DIGlobalVariable::getStaticDataMemberDeclaration(), llvm::DINode::getTag(), llvm::DICompositeType::getTemplateParams(), llvm::DIGlobalVariable::getTemplateParams(), llvm::DITemplateParameter::getType(), llvm::DIVariable::getType(), llvm::DIObjCProperty::getType(), llvm::DISubroutineType::getTypeArray(), llvm::DIEnumerator::getValue(), llvm::DITemplateValueParameter::getValue(), llvm::DIGlobalVariableExpression::getVariable(), llvm::DICompositeType::getVTableHolder(), I, llvm::DIGlobalVariable::isDefinition(), llvm::MDNode::isDistinct(), llvm::DIGlobalVariable::isLocalToUnit(), llvm::DICompileUnit::isOptimized(), llvm::DIEnumerator::isUnsigned(), llvm::bitc::METADATA_BASIC_TYPE, llvm::bitc::METADATA_COMPILE_UNIT, llvm::bitc::METADATA_COMPOSITE_TYPE, llvm::bitc::METADATA_DERIVED_TYPE, llvm::bitc::METADATA_ENUMERATOR, llvm::bitc::METADATA_EXPRESSION, llvm::bitc::METADATA_FILE, llvm::bitc::METADATA_GLOBAL_VAR, llvm::bitc::METADATA_GLOBAL_VAR_EXPR, llvm::bitc::METADATA_IMPORTED_ENTITY, llvm::bitc::METADATA_LABEL, llvm::bitc::METADATA_LEXICAL_BLOCK, llvm::bitc::METADATA_LEXICAL_BLOCK_FILE, llvm::bitc::METADATA_LOCAL_VAR, llvm::bitc::METADATA_MACRO, llvm::bitc::METADATA_MACRO_FILE, llvm::bitc::METADATA_MODULE, llvm::bitc::METADATA_NAME, llvm::bitc::METADATA_NAMED_NODE, llvm::bitc::METADATA_NAMESPACE, llvm::bitc::METADATA_OBJC_PROPERTY, llvm::bitc::METADATA_STRINGS, llvm::bitc::METADATA_SUBPROGRAM, llvm::bitc::METADATA_SUBRANGE, llvm::bitc::METADATA_SUBROUTINE_TYPE, llvm::bitc::METADATA_TEMPLATE_TYPE, llvm::bitc::METADATA_TEMPLATE_VALUE, llvm::Module::named_metadata(), llvm::Module::named_metadata_empty(), llvm::MDNode::operands(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::SmallVectorBase::size(), llvm::ArrayRef< T >::size(), llvm::Sched::Source, llvm::BitCodeAbbrevOp::VBR, llvm::IndexedInstrProf::Version, llvm::RISCVFenceField::W, writeDIBasicType(), writeDICompileUnit(), writeDICompositeType(), writeDIDerivedType(), writeDIEnumerator(), writeDIExpression(), writeDIFile(), writeDIGlobalVariable(), writeDIGlobalVariableExpression(), writeDIImportedEntity(), writeDILabel(), writeDILexicalBlock(), writeDILexicalBlockFile(), writeDILocalVariable(), writeDIMacro(), writeDIMacroFile(), writeDIModule(), writeDINamespace(), writeDIObjCProperty(), writeDISubprogram(), writeDISubrange(), writeDISubroutineType(), writeDITemplateTypeParameter(), and writeDITemplateValueParameter().
|
static |
Helper to write the header common to all bitcode files.
Definition at line 4173 of file BitcodeWriter.cpp.
References llvm::BitstreamWriter::Emit().
Referenced by llvm::BitcodeWriter::BitcodeWriter().
|
static |
Write the function type metadata related records that need to appear before a function summary entry (whether per-module or combined).
Definition at line 3418 of file BitcodeWriter.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::BitstreamWriter::EmitRecord(), llvm::SmallVectorTemplateCommon< T >::end(), 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::SmallVectorImpl< T >::insert(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::FunctionSummary::type_checked_load_const_vcalls(), llvm::FunctionSummary::type_checked_load_vcalls(), llvm::FunctionSummary::type_test_assume_const_vcalls(), llvm::FunctionSummary::type_test_assume_vcalls(), llvm::FunctionSummary::type_tests(), and llvm::AArch64CC::VC.
Referenced by writeTypeIdSummaryRecord().
|
static |
Create the "IDENTIFICATION_BLOCK_ID" containing a single string with the current llvm version, and a record for the epoch number.
Definition at line 4004 of file BitcodeWriter.cpp.
References llvm::BitCodeAbbrevOp::Array, llvm::sys::path::begin(), llvm::Module::begin(), llvm::bitc::BITCODE_CURRENT_EPOCH, llvm::BitCodeAbbrevOp::Char6, llvm::copy(), llvm::StringRef::data(), E, llvm::BitstreamWriter::EmitAbbrev(), llvm::BitstreamWriter::EmitRecord(), llvm::Module::end(), llvm::BitstreamWriter::EnterSubblock(), llvm::BitstreamWriter::ExitBlock(), F(), llvm::bitc::IDENTIFICATION_BLOCK_ID, llvm::bitc::IDENTIFICATION_CODE_EPOCH, llvm::bitc::IDENTIFICATION_CODE_STRING, llvm::GlobalValue::isDeclaration(), llvm::bitc::MODULE_BLOCK_ID, llvm::bitc::MODULE_CODE_HASH, llvm::support::endian::read32be(), llvm::ValueEnumerator::shouldPreserveUseListOrder(), llvm::BitCodeAbbrevOp::VBR, write(), and writeStringRecord().
|
static |
Definition at line 4107 of file BitcodeWriter.cpp.
References llvm::support::endian::write32le().
Referenced by emitDarwinBCHeaderAndTrailer().
|
static |
Definition at line 579 of file BitcodeWriter.cpp.
References llvm::BitstreamWriter::EmitRecord(), llvm::BitCodeAbbrevOp::isChar6(), llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::StringRef::size().
Referenced by getAttrKindEncoding(), getStringEncoding(), and writeIdentificationBlock().
|
static |
Definition at line 3512 of file BitcodeWriter.cpp.
References llvm::StringTableBuilder::add(), llvm::TypeTestResolution::AlignLog2, assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::TypeTestResolution::BitMask, llvm::FunctionSummary::calls(), llvm::SmallVectorImpl< T >::clear(), llvm::BitstreamWriter::EmitRecord(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::FunctionSummary::fflags(), llvm::GlobalValueSummary::flags(), llvm::bitc::FS_PERMODULE, llvm::bitc::FS_PERMODULE_GLOBALVAR_INIT_REFS, llvm::bitc::FS_PERMODULE_PROFILE, llvm::bitc::FS_PERMODULE_RELBF, llvm::FunctionSummary::FSHT_None, getEncodedFFlags(), getEncodedGVarFlags(), getEncodedGVSummaryFlags(), llvm::GlobalValue::getGUID(), llvm::ValueInfo::getSummaryList(), llvm::ValueEnumerator::getValueID(), llvm::Function::hasProfileData(), llvm::FunctionSummary::immutableRefCount(), llvm::TypeTestResolution::InlineBits, llvm::FunctionSummary::instCount(), llvm::GlobalValue::isDeclaration(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::GlobalValueSummary::refs(), llvm::SmallVectorBase::size(), llvm::TypeTestResolution::SizeM1, llvm::TypeTestResolution::SizeM1BitWidth, llvm::sort(), llvm::TypeTestResolution::TheKind, llvm::TypeIdSummary::TTRes, llvm::GlobalVarSummary::varflags(), llvm::AArch64CC::VS, llvm::RISCVFenceField::W, llvm::TypeIdSummary::WPDRes, writeFunctionTypeMetadataRecords(), WriteRelBFToSummary, and writeWholeProgramDevirtResolution().
|
static |
Definition at line 3498 of file BitcodeWriter.cpp.
References llvm::StringTableBuilder::add(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::WholeProgramDevirtResolution::ResByArg, llvm::WholeProgramDevirtResolution::SingleImplName, llvm::WholeProgramDevirtResolution::TheKind, and writeWholeProgramDevirtResolutionByArg().
Referenced by writeTypeIdSummaryRecord().
|
static |
Definition at line 3486 of file BitcodeWriter.cpp.
References llvm::WholeProgramDevirtResolution::ByArg::Bit, llvm::WholeProgramDevirtResolution::ByArg::Byte, llvm::SmallVectorTemplateCommon< T >::end(), llvm::WholeProgramDevirtResolution::ByArg::Info, llvm::SmallVectorImpl< T >::insert(), llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::WholeProgramDevirtResolution::ByArg::TheKind.
Referenced by writeWholeProgramDevirtResolution().
FunctionSummary::ForceSummaryHotnessType ForceSummaryEdgesCold |
Definition at line 64 of file ModuleSummaryAnalysis.cpp.
Referenced by computeFunctionSummary().
|
static |
Definition at line 3604 of file BitcodeWriter.cpp.
|
static |