[PATCH] D46699: [ThinLTO] Print module summary index to assembly
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 24 13:30:39 PDT 2018
pcc added a comment.
This is somewhat of a bikeshed comment but I'm not really a big fan of putting everything on one line. (I know we do that for debug metadata too, but really I'd be in favour of changing that as well.) I'm wondering whether something like this would be easier to read:
^9 = gv: ( ; guid = 17381606045411660303
name: "hot_function",
summaries: (
function: (
module: ^0,
flags: (
linkage: external,
notEligibleToImport: 0,
live: 0,
dsoLocal: 0
),
insts: 16,
calls: (
(callee: ^5, hotness: hot),
(callee: ^6, hotness: cold),
(callee: ^4, hotness: hot),
(callee: ^7, hotness: cold),
(callee: ^10, hotness: none),
(callee: ^3, hotness: hot),
(callee: ^2, hotness: none),
(callee: ^8, hotness: none),
(callee: ^1, hotness: critical)
)
)
)
)
================
Comment at: docs/LangRef.rst:5721
+Specifically, for the Thin Link portion of a ThinLTO compile (either
+via the linker or tools such as llvm-lto2), or when parsing a combined index
+for a distributed ThinLTO backend via clang's "``-fthinlto-index=<>``" flag.
----------------
Probably wouldn't mention the linker, see this part of the thread with David: http://lists.llvm.org/pipermail/llvm-dev/2018-May/122975.html
================
Comment at: lib/IR/AsmWriter.cpp:2776
+static std::string getLinkagePrintName(GlobalValue::LinkageTypes LT,
+ bool AddSpace = true) {
+ std::string Space = AddSpace ? " " : "";
----------------
Maybe changing the other callers to do:
```if (GV->getLinkage() != GlobalValue::ExternalLinkage)
Out << getLinkagePrintName(GV->getLinkage()) << ' ';
```
would be clearer than adding the argument?
Repository:
rL LLVM
https://reviews.llvm.org/D46699
More information about the llvm-commits
mailing list