[PATCH] D84838: [BPI][NFC] Unify handling of normal and SCC based loops
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 09:59:14 PDT 2020
davidxl added inline comments.
================
Comment at: llvm/include/llvm/Analysis/BranchProbabilityInfo.h:258
+ // Pair of LoopBlocks representing an edge from first to second block.
+ using LoopEdge = std::pair<const LoopBlock &, const LoopBlock &>;
+
----------------
Perhaps make it a class and make related methods below members?
================
Comment at: llvm/include/llvm/Analysis/BranchProbabilityInfo.h:292
+ /// other cases.
+ bool isDifferentLoopsEdge(const LoopEdge &Edge) const;
+ /// Returns true if destination block belongs to some loop and source block is
----------------
perhaps "isLoopCrossingEdge' or isLoopEnteringExitingEdge'?
================
Comment at: llvm/include/llvm/Analysis/BranchProbabilityInfo.h:305
+ // Fills in \p Enters vector with all "enter" blocks to a loop \LB belongs to.
+ void getLoopEnterBlocks(const LoopBlock &LB,
+ SmallVectorImpl<BasicBlock *> &Enters) const;
----------------
make it a member of the LoopBlock. Also for consistency: getLoopEnteringBlocks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84838/new/
https://reviews.llvm.org/D84838
More information about the llvm-commits
mailing list