[PATCH] D131824: Split EH code by default

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 17:39:36 PDT 2022


snehasish added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineFunctionSplitter.cpp:102
+      status PredStatus = getStatus(PredMBB);
+      if (PredStatus > Status)
+        Status = PredStatus;
----------------
Please add a comment here to describe the `PredStatus > Status` check.


================
Comment at: llvm/lib/CodeGen/MachineFunctionSplitter.cpp:213
+  if (SplitAllEHCode)
+    setDescendantEHBlocksCold(LandingPads, &MF.front());
   // We only split out eh pads if all of them are cold.
----------------
iamarchit123 wrote:
> snehasish wrote:
> > Can we use MachineDominatorTree::getDescendants here instead?
> Hi Snehashish,
> What about blocks that may not be dominated by single EH pad but by two EH pads? Like reachable from both EH1 and EH2. Won't we miss those blocks?
Yes we will, this approach makes sense. Can you document this and add a descriptive function comment for setDescendantEHBlocksCold?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131824



More information about the llvm-commits mailing list