summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 124fc56e78f..51a0faee81c 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -103,9 +103,17 @@ static OrderMap orderModule(const Module *M) {
orderValue(&A, OM);
}
for (const Function &F : *M) {
- for (const Use &U : F.operands())
- if (!isa<GlobalValue>(U.get()))
- orderValue(U.get(), OM);
+ 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);
orderValue(&F, OM);
@@ -255,8 +263,8 @@ static UseListOrderStack predictUseListOrder(const Module *M) {
for (const GlobalAlias &A : M->aliases())
predictValueUseListOrder(A.getAliasee(), nullptr, OM, Stack);
for (const Function &F : *M)
- for (const Use &U : F.operands())
- predictValueUseListOrder(U.get(), nullptr, OM, Stack);
+ if (F.hasPrefixData())
+ predictValueUseListOrder(F.getPrefixData(), nullptr, OM, Stack);
return Stack;
}
OpenPOWER on IntegriCloud