[PATCH] D80403: [ThinLTO] Compute the basic block count across modules.
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 27 08:38:22 PDT 2020
tejohnson added inline comments.
================
Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:1010
+ // The total number of basic blocks in the module.
+ uint64_t BlockCount;
----------------
Also specify that this would be the total number of bbs in the LTO unit in the combined index (it is the total in the module in the per-module summary).
================
Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:1033
// and BitcodeWriter.cpp.
- static constexpr uint64_t BitcodeSummaryVersion = 8;
+ static constexpr uint64_t BitcodeSummaryVersion = 9;
----------------
I'm not convinced a version bump is required. Isn't the lack of a block count record handled naturally ( i.e. the count stays at 0 in the index)?
================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:6244
+ case bitc::FS_BLOCK_COUNT:
+ // TheIndex.setBlockCount(Record[0]);
+ TheIndex.addBlockCount(Record[0]);
----------------
Remove commented out line. Presumably this uses addBlockCount instead of setBlockCount so that it gets merged properly when building the combined index?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80403/new/
https://reviews.llvm.org/D80403
More information about the llvm-commits
mailing list