[PATCH] D159526: [CodeLayout] Refactor std::vector uses, namespace, and EdgeCountT. NFC
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 15:31:39 PDT 2023
dblaikie added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CodeLayout.cpp:1403-1404
std::vector<uint64_t> OutDegree(NodeSizes.size(), 0);
- for (auto It : EdgeCounts) {
- uint64_t Pred = It.first.first;
- OutDegree[Pred]++;
- }
+ for (auto [Pred, Succ, Count] : EdgeCounts)
+ ++OutDegree[Pred];
----------------
I probably wouldn't use a structured binding if it's a struct with named members already (obfuscates that fact a bit, risks naming the bindings differently than the members, or having them otherwise get out of sync, etc). (similarly elsewhere in this change)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159526/new/
https://reviews.llvm.org/D159526
More information about the llvm-commits
mailing list