ValueEnumerator.cpp (204642) | ValueEnumerator.cpp (206124) |
---|---|
1//===-- ValueEnumerator.cpp - Number values and types for bitcode writer --===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 90 unchanged lines hidden (view full) --- 99 EnumerateType(I->getType()); 100 if (const CallInst *CI = dyn_cast<CallInst>(I)) 101 EnumerateAttributes(CI->getAttributes()); 102 else if (const InvokeInst *II = dyn_cast<InvokeInst>(I)) 103 EnumerateAttributes(II->getAttributes()); 104 105 // Enumerate metadata attached with this instruction. 106 MDs.clear(); | 1//===-- ValueEnumerator.cpp - Number values and types for bitcode writer --===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 90 unchanged lines hidden (view full) --- 99 EnumerateType(I->getType()); 100 if (const CallInst *CI = dyn_cast<CallInst>(I)) 101 EnumerateAttributes(CI->getAttributes()); 102 else if (const InvokeInst *II = dyn_cast<InvokeInst>(I)) 103 EnumerateAttributes(II->getAttributes()); 104 105 // Enumerate metadata attached with this instruction. 106 MDs.clear(); |
107 I->getAllMetadata(MDs); | 107 I->getAllMetadataOtherThanDebugLoc(MDs); |
108 for (unsigned i = 0, e = MDs.size(); i != e; ++i) 109 EnumerateMetadata(MDs[i].second); | 108 for (unsigned i = 0, e = MDs.size(); i != e; ++i) 109 EnumerateMetadata(MDs[i].second); |
110 111 if (!I->getDebugLoc().isUnknown()) { 112 MDNode *Scope, *IA; 113 I->getDebugLoc().getScopeAndInlinedAt(Scope, IA, I->getContext()); 114 if (Scope) EnumerateMetadata(Scope); 115 if (IA) EnumerateMetadata(IA); 116 } |
|
110 } 111 } 112 113 // Optimize constant ordering. 114 OptimizeConstants(FirstConstant, Values.size()); 115 116 // Sort the type table by frequency so that most commonly used types are early 117 // in the table (have low bit-width). --- 343 unchanged lines hidden --- | 117 } 118 } 119 120 // Optimize constant ordering. 121 OptimizeConstants(FirstConstant, Values.size()); 122 123 // Sort the type table by frequency so that most commonly used types are early 124 // in the table (have low bit-width). --- 343 unchanged lines hidden --- |