[PATCH] D139872: [llvm][CallBrPrepare] split critical edges

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 15:39:38 PST 2023


void accepted this revision.
void added a comment.

LGTM. One suggestion that you can ignore if you wish.



================
Comment at: llvm/lib/CodeGen/CallBrPrepare.cpp:96
+    // at index 1 to avoid the default destination.
+    for (unsigned i = 1, e = CBR->getNumSuccessors(); i != e; ++i) {
+      // The same destination may appear multiple times in a callbr
----------------
You can iterate over the indirect destinations. Something like:

```
for (BasicBlock *BB : CBR->getIndirectDests()) {
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139872/new/

https://reviews.llvm.org/D139872



More information about the llvm-commits mailing list