[PATCH] D62439: PGO] Handle cases of failing to split critical edges
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 27 18:01:27 PDT 2019
davidxl added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:755
+ // Use a worklist as we will update the vector during the iteration.
+ std::vector<Edge *> WorkList;
+ for (auto &E : MST.AllEdges)
----------------
Nit. The name 'WorkList' implies it will be updated on the fly -- but here it is the opposite. How about just name it 'EdgeList'
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1075
+ Info.setBBInfoCount(CountValue);
+ if (Info.InEdges.size() == 1) {
+ Info.InEdges[0]->setEdgeCount(CountValue);
----------------
Explain this change.
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1078
+ }
+ if (Info.OutEdges.size() == 1) {
+ Info.OutEdges[0]->setEdgeCount(CountValue);
----------------
Same here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62439/new/
https://reviews.llvm.org/D62439
More information about the llvm-commits
mailing list