37 cl::desc(
"Turn on experimental support for "
38 "use-list order preservation."),
88 case Instruction::Add:
90 case Instruction::Sub:
92 case Instruction::Mul:
95 case Instruction::FDiv:
98 case Instruction::FRem:
140 switch (SynchScope) {
152 for (
unsigned i = 0, e = Str.
size(); i != e; ++i) {
250 if (AttrGrps.empty())
return;
255 for (
unsigned i = 0, e = AttrGrps.size(); i != e; ++i) {
257 for (
unsigned i = 0, e = AS.
getNumSlots(); i != e; ++i) {
298 if (Attrs.empty())
return;
303 for (
unsigned i = 0, e = Attrs.size(); i != e; ++i) {
305 for (
unsigned i = 0, e = A.
getNumSlots(); i != e; ++i)
338 unsigned FunctionAbbrev = Stream.
EmitAbbrev(Abbv);
347 unsigned StructAnonAbbrev = Stream.
EmitAbbrev(Abbv);
354 unsigned StructNameAbbrev = Stream.
EmitAbbrev(Abbv);
363 unsigned StructNamedAbbrev = Stream.
EmitAbbrev(Abbv);
371 unsigned ArrayAbbrev = Stream.
EmitAbbrev(Abbv);
379 for (
unsigned i = 0, e = TypeList.size(); i != e; ++i) {
380 Type *
T = TypeList[i];
408 if (AddressSpace == 0) AbbrevToUse = PtrAbbrev;
417 for (
unsigned i = 0, e = FT->
getNumParams(); i != e; ++i)
419 AbbrevToUse = FunctionAbbrev;
433 AbbrevToUse = StructAnonAbbrev;
439 AbbrevToUse = StructNamedAbbrev;
445 StructNameAbbrev, Stream);
455 AbbrevToUse = ArrayAbbrev;
469 Stream.
EmitRecord(Code, TypeVals, AbbrevToUse);
534 std::map<std::string, unsigned> SectionMap;
535 std::map<std::string, unsigned> GCMap;
536 unsigned MaxAlignment = 0;
537 unsigned MaxGlobalType = 0;
540 MaxAlignment = std::max(MaxAlignment, GV->getAlignment());
541 MaxGlobalType = std::max(MaxGlobalType, VE.
getTypeID(GV->getType()));
542 if (GV->hasSection()) {
544 unsigned &Entry = SectionMap[GV->getSection()];
548 Entry = SectionMap.size();
553 MaxAlignment = std::max(MaxAlignment,
F->getAlignment());
554 if (
F->hasSection()) {
556 unsigned &Entry = SectionMap[
F->getSection()];
560 Entry = SectionMap.size();
565 unsigned &Entry = GCMap[
F->getGC()];
569 Entry = GCMap.size();
575 unsigned SimpleGVarAbbrev = 0;
585 if (MaxAlignment == 0)
588 unsigned MaxEncAlignment =
Log2_32(MaxAlignment)+1;
592 if (SectionMap.empty())
605 unsigned AbbrevToUse = 0;
616 Vals.
push_back(GV->hasSection() ? SectionMap[GV->getSection()] : 0);
617 if (GV->isThreadLocal() ||
619 GV->hasUnnamedAddr() || GV->isExternallyInitialized()) {
623 Vals.
push_back(GV->isExternallyInitialized());
625 AbbrevToUse = SimpleGVarAbbrev;
642 Vals.
push_back(
F->hasSection() ? SectionMap[
F->getSection()] : 0);
644 Vals.
push_back(
F->hasGC() ? GCMap[
F->getGC()] : 0);
649 unsigned AbbrevToUse = 0;
662 unsigned AbbrevToUse = 0;
672 dyn_cast<OverflowingBinaryOperator>(V)) {
673 if (OBO->hasNoSignedWrap())
675 if (OBO->hasNoUnsignedWrap())
678 dyn_cast<PossiblyExactOperator>(V)) {
682 dyn_cast<const FPMathOperator>(V)) {
683 if (FPMO->hasUnsafeAlgebra())
685 if (FPMO->hasNoNaNs())
687 if (FPMO->hasNoInfs())
689 if (FPMO->hasNoSignedZeros())
691 if (FPMO->hasAllowReciprocal())
721 bool StartedMetadataBlock =
false;
722 unsigned MDSAbbrev = 0;
724 for (
unsigned i = 0, e = Vals.size(); i != e; ++i) {
726 if (
const MDNode *
N = dyn_cast<MDNode>(Vals[i].first)) {
727 if (!
N->isFunctionLocal() || !
N->getFunction()) {
728 if (!StartedMetadataBlock) {
730 StartedMetadataBlock =
true;
734 }
else if (
const MDString *MDS = dyn_cast<MDString>(Vals[i].first)) {
735 if (!StartedMetadataBlock) {
744 StartedMetadataBlock =
true;
748 Record.
append(MDS->begin(), MDS->end());
760 if (!StartedMetadataBlock) {
762 StartedMetadataBlock =
true;
767 for (
unsigned i = 0, e = Str.
size(); i != e; ++i)
779 if (StartedMetadataBlock)
786 bool StartedMetadataBlock =
false;
789 for (
unsigned i = 0, e = Vals.
size(); i != e; ++i)
791 if (
N->isFunctionLocal() &&
N->getFunction() == &
F) {
792 if (!StartedMetadataBlock) {
794 StartedMetadataBlock =
true;
799 if (StartedMetadataBlock)
818 I->getAllMetadataOtherThanDebugLoc(MDs);
821 if (MDs.
empty())
continue;
825 for (
unsigned i = 0, e = MDs.
size(); i != e; ++i) {
844 if (Names.
empty())
return;
848 for (
unsigned MDKindID = 0, e = Names.
size(); MDKindID != e; ++MDKindID) {
870 if (FirstVal == LastVal)
return;
874 unsigned AggregateAbbrev = 0;
875 unsigned String8Abbrev = 0;
876 unsigned CString7Abbrev = 0;
877 unsigned CString6Abbrev = 0;
911 for (
unsigned i = FirstVal; i != LastVal; ++i) {
912 const Value *V = Vals[i].first;
922 if (
const InlineAsm *IA = dyn_cast<InlineAsm>(V)) {
923 Record.
push_back(
unsigned(IA->hasSideEffects()) |
924 unsigned(IA->isAlignStack()) << 1 |
925 unsigned(IA->getDialect()&1) << 2);
928 const std::string &AsmStr = IA->getAsmString();
930 for (
unsigned i = 0, e = AsmStr.size(); i != e; ++i)
934 const std::string &ConstraintStr = IA->getConstraintString();
936 for (
unsigned i = 0, e = ConstraintStr.size(); i != e; ++i)
944 unsigned AbbrevToUse = 0;
947 }
else if (isa<UndefValue>(C)) {
949 }
else if (
const ConstantInt *IV = dyn_cast<ConstantInt>(C)) {
950 if (IV->getBitWidth() <= 64) {
951 uint64_t V = IV->getSExtValue();
960 unsigned NWords = IV->getValue().getActiveWords();
961 const uint64_t *RawWords = IV->getValue().getRawData();
962 for (
unsigned i = 0; i != NWords; ++i) {
967 }
else if (
const ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
969 Type *Ty = CFP->getType();
971 Record.
push_back(CFP->getValueAPF().bitcastToAPInt().getZExtValue());
975 APInt api = CFP->getValueAPF().bitcastToAPInt();
977 Record.
push_back((p[1] << 48) | (p[0] >> 16));
980 APInt api = CFP->getValueAPF().bitcastToAPInt();
985 assert (0 &&
"Unknown FP type!");
987 }
else if (isa<ConstantDataSequential>(C) &&
988 cast<ConstantDataSequential>(C)->isString()) {
998 AbbrevToUse = String8Abbrev;
1002 for (
unsigned i = 0; i != NumElts; ++i) {
1005 isCStr7 &= (V & 128) == 0;
1011 AbbrevToUse = CString6Abbrev;
1013 AbbrevToUse = CString7Abbrev;
1015 dyn_cast<ConstantDataSequential>(C)) {
1017 Type *EltTy = CDS->getType()->getElementType();
1018 if (isa<IntegerType>(EltTy)) {
1019 for (
unsigned i = 0, e = CDS->getNumElements(); i != e; ++i)
1020 Record.
push_back(CDS->getElementAsInteger(i));
1022 for (
unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) {
1023 union {
float F; uint32_t
I; };
1024 F = CDS->getElementAsFloat(i);
1028 assert(EltTy->
isDoubleTy() &&
"Unknown ConstantData element type");
1029 for (
unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) {
1030 union {
double F; uint64_t
I; };
1031 F = CDS->getElementAsDouble(i);
1035 }
else if (isa<ConstantArray>(C) || isa<ConstantStruct>(C) ||
1036 isa<ConstantVector>(C)) {
1040 AbbrevToUse = AggregateAbbrev;
1041 }
else if (
const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
1042 switch (CE->getOpcode()) {
1051 assert(CE->getNumOperands() == 2 &&
"Unknown constant expr!");
1061 case Instruction::GetElementPtr:
1063 if (cast<GEPOperator>(C)->isInBounds())
1065 for (
unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) {
1082 case Instruction::InsertElement:
1088 case Instruction::ShuffleVector:
1103 case Instruction::ICmp:
1104 case Instruction::FCmp:
1112 }
else if (
const BlockAddress *BA = dyn_cast<BlockAddress>(C)) {
1123 Stream.
EmitRecord(Code, Record, AbbrevToUse);
1136 for (
unsigned i = 0, e = Vals.size(); i != e; ++i) {
1137 if (!isa<GlobalValue>(Vals[i].first)) {
1158 if (ValID >= InstID) {
1178 int64_t diff = ((int32_t)InstID - (int32_t)ValID);
1187 unsigned AbbrevToUse = 0;
1198 assert(isa<BinaryOperator>(I) &&
"Unknown instruction!");
1208 Vals.push_back(Flags);
1213 case Instruction::GetElementPtr:
1215 if (cast<GEPOperator>(&I)->isInBounds())
1220 case Instruction::ExtractValue: {
1224 for (
const unsigned *i = EVI->idx_begin(), *e = EVI->idx_end(); i != e; ++i)
1228 case Instruction::InsertValue: {
1233 for (
const unsigned *i = IVI->idx_begin(), *e = IVI->idx_end(); i != e; ++i)
1248 case Instruction::InsertElement:
1254 case Instruction::ShuffleVector:
1260 case Instruction::ICmp:
1261 case Instruction::FCmp:
1266 Vals.push_back(cast<CmpInst>(I).getPredicate());
1273 if (NumOperands == 0)
1275 else if (NumOperands == 1) {
1279 for (
unsigned i = 0, e = NumOperands; i != e; ++i)
1284 case Instruction::Br:
1295 case Instruction::Switch:
1304 Vals.push_back(VE.
getValueID(i.getCaseValue()));
1305 Vals.push_back(VE.
getValueID(i.getCaseSuccessor()));
1309 case Instruction::IndirectBr:
1318 case Instruction::Invoke: {
1321 PointerType *PTy = cast<PointerType>(Callee->getType());
1322 FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
1332 for (
unsigned i = 0, e = FTy->getNumParams(); i != e; ++i)
1336 if (FTy->isVarArg()) {
1343 case Instruction::Resume:
1347 case Instruction::Unreachable:
1353 const PHINode &PN = cast<PHINode>(
I);
1365 Stream.
EmitRecord(Code, Vals64, AbbrevToUse);
1370 case Instruction::LandingPad: {
1387 case Instruction::Alloca:
1392 Vals.push_back(
Log2_32(cast<AllocaInst>(I).getAlignment())+1);
1396 if (cast<LoadInst>(I).
isAtomic()) {
1404 Vals.push_back(
Log2_32(cast<LoadInst>(I).getAlignment())+1);
1405 Vals.push_back(cast<LoadInst>(I).isVolatile());
1406 if (cast<LoadInst>(I).
isAtomic()) {
1418 Vals.push_back(
Log2_32(cast<StoreInst>(I).getAlignment())+1);
1419 Vals.push_back(cast<StoreInst>(I).isVolatile());
1420 if (cast<StoreInst>(I).
isAtomic()) {
1425 case Instruction::AtomicCmpXchg:
1430 Vals.push_back(cast<AtomicCmpXchgInst>(I).isVolatile());
1432 cast<AtomicCmpXchgInst>(I).getOrdering()));
1434 cast<AtomicCmpXchgInst>(I).getSynchScope()));
1436 case Instruction::AtomicRMW:
1441 cast<AtomicRMWInst>(I).getOperation()));
1442 Vals.push_back(cast<AtomicRMWInst>(I).isVolatile());
1445 cast<AtomicRMWInst>(I).getSynchScope()));
1447 case Instruction::Fence:
1455 FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
1464 for (
unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) {
1466 if (FTy->getParamType(i)->isLabelTy())
1473 if (FTy->isVarArg()) {
1480 case Instruction::VAArg:
1496 if (VST.
empty())
return;
1510 bool isChar6 =
true;
1515 if ((
unsigned char)*
C & 128) {
1526 if (isa<BasicBlock>(SI->getValue())) {
1544 Stream.
EmitRecord(Code, NameVals, AbbrevToUse);
1565 unsigned CstStart, CstEnd;
1573 unsigned InstID = CstEnd;
1575 bool NeedsMetadataAttachment =
false;
1585 if (!
I->getType()->isVoidTy())
1589 NeedsMetadataAttachment |=
I->hasMetadataOtherThanDebugLoc();
1595 }
else if (DL == LastDL) {
1616 if (NeedsMetadataAttachment)
1804 UseList.push_back(U);
1831 if ((isa<Constant>(*OI) && !isa<GlobalValue>(*OI)) ||
1832 isa<InlineAsm>(*OI))
1851 I->removeDeadConstantUsers();
1859 if (GI->hasInitializer())
1866 if (!FI->isDeclaration())
1868 if (FI->hasPrefixData())
1887 unsigned CurVersion = 1;
1928 if (!
F->isDeclaration())
1953 uint32_t &Position) {
1954 Buffer[Position + 0] = (
unsigned char) (Value >> 0);
1955 Buffer[Position + 1] = (
unsigned char) (Value >> 8);
1956 Buffer[Position + 2] = (
unsigned char) (Value >> 16);
1957 Buffer[Position + 3] = (
unsigned char) (Value >> 24);
1970 DARWIN_CPU_ARCH_ABI64 = 0x01000000,
1971 DARWIN_CPU_TYPE_X86 = 7,
1972 DARWIN_CPU_TYPE_ARM = 12,
1973 DARWIN_CPU_TYPE_POWERPC = 18
1978 CPUType = DARWIN_CPU_TYPE_X86 | DARWIN_CPU_ARCH_ABI64;
1980 CPUType = DARWIN_CPU_TYPE_X86;
1982 CPUType = DARWIN_CPU_TYPE_POWERPC;
1984 CPUType = DARWIN_CPU_TYPE_POWERPC | DARWIN_CPU_ARCH_ABI64;
1986 CPUType = DARWIN_CPU_TYPE_ARM;
1990 "Expected header size to be reserved");
1995 unsigned Position = 0;
2003 while (Buffer.
size() & 15)
2016 if (TT.isOSDarwin())
2024 Stream.
Emit((
unsigned)
'B', 8);
2025 Stream.
Emit((
unsigned)
'C', 8);
2026 Stream.
Emit(0x0, 4);
2027 Stream.
Emit(0xC, 4);
2028 Stream.
Emit(0xE, 4);
2029 Stream.
Emit(0xD, 4);
2035 if (TT.isOSDarwin())
const Value * getCalledValue() const
static unsigned GetEncodedSynchScope(SynchronizationScope SynchScope)
StringRef getName() const
getName - Return a constant reference to this named metadata's name.
void push_back(const T &Elt)
unsigned Log2_32_Ceil(uint32_t Value)
LinkageTypes getLinkage() const
const ValueSymbolTable & getValueSymbolTable() const
Get the symbol table of global variable and function identifiers.
Like Private, but linker removes.
static void WriteAttributeTable(const ValueEnumerator &VE, BitstreamWriter &Stream)
Special purpose, only applies to global arrays.
VisibilityTypes getVisibility() const
*p = old <signed v ? old : v
static unsigned getEncodedLinkage(const GlobalValue *GV)
iterator begin()
Get an iterator that from the beginning of the symbol table.
ThreadLocalMode getThreadLocalMode() const
size_t size() const
size - Get the string size.
static uint64_t GetOptimizationFlags(const Value *V)
static void WriteFunction(const Function &F, ValueEnumerator &VE, BitstreamWriter &Stream)
WriteFunction - Emit a function body to the module stream.
Sign extended before/after call.
Force argument to be passed in register.
The main container class for the LLVM Intermediate Representation.
unsigned getNumParams() const
2: 32-bit floating point type
Same, but only replaced by something equivalent.
bool hasNUses(unsigned N) const
static bool PushValueAndType(const Value *V, unsigned InstID, SmallVectorImpl< unsigned > &Vals, ValueEnumerator &VE)
static void WriteModuleMetadata(const Module *M, const ValueEnumerator &VE, BitstreamWriter &Stream)
static void WriteStringRecord(unsigned Code, StringRef Str, unsigned AbbrevToUse, BitstreamWriter &Stream)
unsigned getNumOperands() const
Available for inspection, not emission.
Nested function static chain.
unsigned getNumOperands() const
getNumOperands - Return number of MDNode operands.
named_metadata_iterator named_metadata_end()
void setInstructionID(const Instruction *I)
uint64_t getValueAsInt() const
Return the attribute's value as an integer. This requires that the attribute be an alignment attribut...
*p = old <unsigned v ? old : v
Like Internal, but omit from symbol table.
Source said inlining was desirable.
*p = old >unsigned v ? old : v
Externally visible function.
iterator insert(iterator I, const T &Elt)
bool isDoubleTy() const
isDoubleTy - Return true if this is 'double', a 64-bit IEEE fp type.
void Add(const BitCodeAbbrevOp &OpInfo)
iterator begin(unsigned Slot) const
static void WriteConstants(unsigned FirstVal, unsigned LastVal, const ValueEnumerator &VE, BitstreamWriter &Stream, bool isGlobal)
void getScopeAndInlinedAt(MDNode *&Scope, MDNode *&IA, const LLVMContext &Ctx) const
getScopeAndInlinedAt - Return both the Scope and the InlinedAt values.
MDNode - a tuple of other values.
4: 80-bit floating point type (X87)
unsigned getAddressSpace() const
Return the address space of the Pointer type.
1: 16-bit floating point type
std::vector< std::pair< const Value *, unsigned > > ValueList
Value * getPersonalityFn() const
*p = old >signed v ? old : v
const std::string & getTargetTriple() const
void EmitRecord(unsigned Code, SmallVectorImpl< uintty > &Vals, unsigned Abbrev=0)
static void WriteModuleConstants(const ValueEnumerator &VE, BitstreamWriter &Stream)
void EnterBlockInfoBlock(unsigned CodeWidth)
EnterBlockInfoBlock - Start emitting the BLOCKINFO_BLOCK.
Value * getOperand(unsigned i) const LLVM_READONLY
getOperand - Return specified operand.
void incorporateFunction(const Function &F)
element_iterator element_end() const
void getMDKindNames(SmallVectorImpl< StringRef > &Result) const
static void pushValueSigned(const Value *V, unsigned InstID, SmallVectorImpl< uint64_t > &Vals, ValueEnumerator &VE)
StringRef getKindAsString() const
Return the attribute's kind as a string. This requires the attribute to be a string attribute...
bool isUnknown() const
isUnknown - Return true if this is an unknown location.
void dump() const
dump - Support for debugging, callable in GDB: V->dump()
static unsigned getBitWidth(Type *Ty, const DataLayout *TD)
Type::subtype_iterator element_iterator
#define llvm_unreachable(msg)
unsigned getNumArgOperands() const
static void WriteAttributeGroupTable(const ValueEnumerator &VE, BitstreamWriter &Stream)
const Value * getCalledValue() const
No attributes have been set.
void Emit(uint32_t Val, unsigned NumBits)
Function must be in a unwind table.
element_iterator element_begin() const
static ConstantInt * ExtractElement(Constant *V, Constant *Idx)
static void WriteUseList(const Value *V, const ValueEnumerator &VE, BitstreamWriter &Stream)
Function does not access memory.
Hidden pointer to structure to return.
Function creates no aliases of pointer.
global_iterator global_begin()
unsigned getAttributeID(AttributeSet PAL) const
const TypeList & getTypes() const
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
unsigned getInstructionID(const Instruction *I) const
unsigned getValueID(const Value *V) const
bool isHalfTy() const
isHalfTy - Return true if this is 'half', a 16-bit IEEE fp type.
static bool bitcodereader_order(const User *lhs, const User *rhs)
Function to be imported from DLL.
BasicBlock * getSuccessor(unsigned i) const
unsigned getNumClauses() const
getNumClauses - Get the number of clauses for this landing pad.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
void getFunctionConstantRange(unsigned &Start, unsigned &End) const
const ValueList & getMDValues() const
iterator end()
Get an iterator to the end of the symbol table.
unsigned getNumElements() const
Return the number of elements in the Vector type.
ValueSymbolTable & getValueSymbolTable()
void EnterSubblock(unsigned BlockID, unsigned CodeLen)
bool isPPC_FP128Ty() const
isPPC_FP128Ty - Return true if this is powerpc long double.
Type * getElementType() const
Considered to not alias after call.
BasicBlock * getNormalDest() const
unsigned getNumIncomingValues() const
bool global_empty() const
static unsigned getEncodedThreadLocalMode(const GlobalVariable *GV)
10: Arbitrary bit width integers
Value * getClause(unsigned Idx) const
ExternalWeak linkage description.
bool isAlignAttribute() const
Return true if the attribute is an alignment attribute.
const ValueList & getValues() const
Same, but only replaced by something equivalent.
const std::vector< AttributeSet > & getAttributes() const
unsigned getNumSlots() const
Return the number of slots used in this attribute list. This is the number of arguments that have an ...
Type * getParamType(unsigned i) const
Parameter type accessors.
initializer< Ty > init(const Ty &Val)
unsigned getTypeID(Type *T) const
unsigned EmitAbbrev(BitCodeAbbrev *Abbv)
alias_iterator alias_end()
static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind)
AttributeSet getSlotAttributes(unsigned Slot) const
Return the attributes at the given slot.
LLVM Constant Representation.
bool isFloatTy() const
isFloatTy - Return true if this is 'float', a 32-bit IEEE fp type.
APInt Or(const APInt &LHS, const APInt &RHS)
Bitwise OR function for APInt.
APInt Xor(const APInt &LHS, const APInt &RHS)
Bitwise XOR function for APInt.
static void WriteMetadataAttachment(const Function &F, const ValueEnumerator &VE, BitstreamWriter &Stream)
Return value is always equal to this argument.
unsigned getAttributeGroupID(AttributeSet PAL) const
static void WriteBlockInfo(const ValueEnumerator &VE, BitstreamWriter &Stream)
static cl::opt< bool > EnablePreserveUseListOrdering("enable-bc-uselist-preserve", cl::desc("Turn on experimental support for ""use-list order preservation."), cl::init(false), cl::Hidden)
unsigned EmitBlockInfoAbbrev(unsigned BlockID, BitCodeAbbrev *Abbv)
static Type * getVoidTy(LLVMContext &C)
BasicBlock * getIncomingBlock(unsigned i) const
uint64_t getNumElements() const
static unsigned getEncodedVisibility(const GlobalValue *GV)
MDNode * getOperand(unsigned i) const
getOperand - Return specified operand.
static void WriteMDNode(const MDNode *N, const ValueEnumerator &VE, BitstreamWriter &Stream, SmallVectorImpl< uint64_t > &Record)
6: 128-bit floating point type (two 64-bits, PowerPC)
Value * getOperand(unsigned i) const
Zero extended before/after call.
static void EmitDarwinBCHeaderAndTrailer(SmallVectorImpl< char > &Buffer, const Triple &TT)
Function to be accessible from DLL.
Function doesn't unwind stack.
bool isEnumAttribute() const
Return true if the attribute is an Attribute::AttrKind type.
Marks function as being in a cold path.
Sentinal value useful for loops.
Mark the function as not returning.
uint64_t getElementAsInteger(unsigned i) const
void append(in_iter in_start, in_iter in_end)
bool isFP128Ty() const
isFP128Ty - Return true if this is 'fp128'.
LLVMContext & getContext() const
All values hold a context through their type.
static bool isAtomic(Instruction *I)
static void WriteModuleUseLists(const Module *M, ValueEnumerator &VE, BitstreamWriter &Stream)
static unsigned GetEncodedRMWOperation(AtomicRMWInst::BinOp Op)
Call cannot be duplicated.
raw_ostream & write(unsigned char C)
CallingConv::ID getCallingConv() const
static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE, BitstreamWriter &Stream)
const std::string & getModuleInlineAsm() const
bool isConditional() const
global_iterator global_end()
static void WriteInstruction(const Instruction &I, unsigned InstID, ValueEnumerator &VE, BitstreamWriter &Stream, SmallVectorImpl< unsigned > &Vals)
WriteInstruction - Emit an instruction to the specified stream.
static void emitSignedInt64(SmallVectorImpl< uint64_t > &Vals, uint64_t V)
BasicBlock * getUnwindDest() const
Class for constant integers.
Value * getIncomingValue(unsigned i) const
15: SIMD 'packed' format, or other vector type
const std::string & getDataLayout() const
Keep one copy of function when linking (inline)
Attribute::AttrKind getKindAsEnum() const
Return the attribute's kind as an enum (Attribute::AttrKind). This requires the attribute to be an en...
iterator end(unsigned Slot) const
static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream)
WriteTypeTable - Write out the type table for a module.
const std::vector< AttributeSet > & getAttributeGroups() const
alias_iterator alias_begin()
static unsigned GetEncodedOrdering(AtomicOrdering Ordering)
const char * getKeyData() const
const std::vector< const BasicBlock * > & getBasicBlocks() const
unsigned Log2_32(uint32_t Value)
static void pushValue(const Value *V, unsigned InstID, SmallVectorImpl< unsigned > &Vals, ValueEnumerator &VE)
Value * getArgOperand(unsigned i) const
Class for arbitrary precision integers.
Function must not be optimized.
StringRef getName() const
Function only reads from memory.
Value * getCondition() const
const AttributeSet & getAttributes() const
APInt And(const APInt &LHS, const APInt &RHS)
Bitwise AND function for APInt.
Like LinkerPrivate, but weak.
bool isFunctionLocal() const
isFunctionLocal - Return whether MDNode is local to a function.
Value * getCondition() const
const AttributeSet & getAttributes() const
bool isX86_FP80Ty() const
isX86_FP80Ty - Return true if this is x86 long double.
BasicBlock * getDefaultDest() const
static unsigned GetEncodedBinaryOpcode(unsigned Opcode)
const uint64_t * getRawData() const
unsigned getSlotIndex(unsigned Slot) const
Return the index for the given slot.
Callee isn't recognized as a builtin.
bool isCatch(unsigned Idx) const
isCatch - Return 'true' if the clause and index Idx is a catch clause.
bool empty() const
Determine if the symbol table is empty.
unsigned getKeyLength() const
unsigned getNumElements() const
getNumElements - Return the number of elements in the array or vector.
const SmallVectorImpl< const MDNode * > & getFunctionLocalMDValues() const
Keep one copy of named function when linking (weak)
Rename collisions when linking (static functions).
static bool isChar6(char C)
isChar6 - Return true if this character is legal in the Char6 encoding.
static void WriteValueSymbolTable(const ValueSymbolTable &VST, const ValueEnumerator &VE, BitstreamWriter &Stream)
static void WriteFunctionUseList(const Function *F, ValueEnumerator &VE, BitstreamWriter &Stream)
3: 64-bit floating point type
StringRef getValueAsString() const
Return the attribute's value as a string. This requires the attribute to be a string attribute...
Type * getReturnType() const
Function can return twice.
unsigned getGlobalBasicBlockID(const BasicBlock *BB) const
LLVM Value Representation.
unsigned getOpcode() const
getOpcode() returns a member of one of the enums like Instruction::Add.
Disable implicit floating point insts.
unsigned getNumOperands() const
getNumOperands - Return the number of NamedMDNode operands.
std::vector< Type * > TypeList
CallingConv::ID getCallingConv() const
static void WriteInt32ToBuffer(uint32_t Value, SmallVectorImpl< char > &Buffer, uint32_t &Position)
static void WriteModule(const Module *M, BitstreamWriter &Stream)
WriteModule - Emit the specified module to the bitstream.
9: MMX vectors (64 bits, X86 specific)
Stack protection required.
void WriteBitcodeToFile(const Module *M, raw_ostream &Out)
named_metadata_iterator named_metadata_begin()
static unsigned GetEncodedCastOpcode(unsigned Opcode)
static void WriteModuleMetadataStore(const Module *M, BitstreamWriter &Stream)
bool empty() const
empty - Check if the string is empty.
5: 128-bit floating point type (112-bit mantissa)
static void WriteFunctionLocalMetadata(const Function &F, const ValueEnumerator &VE, BitstreamWriter &Stream)
Function must be optimized for size first.