if (!isa<GlobalValue>(A.getAliasee()))
orderValue(A.getAliasee(), OM);
for (const Function &F : M) {
- if (F.hasPrefixData())
- if (!isa<GlobalValue>(F.getPrefixData()))
- orderValue(F.getPrefixData(), OM);
- if (F.hasPrologueData())
- if (!isa<GlobalValue>(F.getPrologueData()))
- orderValue(F.getPrologueData(), OM);
- if (F.hasPersonalityFn())
- if (!isa<GlobalValue>(F.getPersonalityFn()))
- orderValue(F.getPersonalityFn(), OM);
+ for (const Use &U : F.operands())
+ if (!isa<GlobalValue>(U.get()))
+ orderValue(U.get(), OM);
}
OM.LastGlobalConstantID = OM.size();
for (const GlobalAlias &A : M.aliases())
predictValueUseListOrder(A.getAliasee(), nullptr, OM, Stack);
for (const Function &F : M) {
- if (F.hasPrefixData())
- predictValueUseListOrder(F.getPrefixData(), nullptr, OM, Stack);
- if (F.hasPrologueData())
- predictValueUseListOrder(F.getPrologueData(), nullptr, OM, Stack);
- if (F.hasPersonalityFn())
- predictValueUseListOrder(F.getPersonalityFn(), nullptr, OM, Stack);
+ for (const Use &U : F.operands())
+ predictValueUseListOrder(U.get(), nullptr, OM, Stack);
}
return Stack;
for (const GlobalAlias &GA : M.aliases())
EnumerateValue(GA.getAliasee());
- // Enumerate the prefix data constants.
+ // Enumerate any optional Function data.
for (const Function &F : M)
- if (F.hasPrefixData())
- EnumerateValue(F.getPrefixData());
-
- // Enumerate the prologue data constants.
- for (const Function &F : M)
- if (F.hasPrologueData())
- EnumerateValue(F.getPrologueData());
-
- // Enumerate the personality functions.
- for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I)
- if (I->hasPersonalityFn())
- EnumerateValue(I->getPersonalityFn());
+ for (const Use &U : F.operands())
+ EnumerateValue(U.get());
// Enumerate the metadata type.
//