[llvm] [IR] Add block number traits to CFG (PR #102758)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 10 16:14:05 PDT 2024
================
@@ -391,12 +423,24 @@ template <> struct GraphTraits<Inverse<Function*>> :
static NodeRef getEntryNode(Inverse<Function *> G) {
return &G.Graph->getEntryBlock();
}
+
+ static unsigned getMaxNumber(Function *F) { return F->getMaxBlockNumber(); }
+ static unsigned getNumberEpoch(Function *F) {
----------------
s-barannikov wrote:
Missing const here and in other declarations
```suggestion
static unsigned getNumberEpoch(const Function *F) {
```
https://github.com/llvm/llvm-project/pull/102758
More information about the llvm-commits
mailing list