[PATCH] D96372: [CodeGen] Split out cold exception handling pads.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 18:32:39 PST 2021


rahmanl accepted this revision.
rahmanl added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/test/CodeGen/X86/machine-function-splitter.ll:206
+
+hot:
+  %2 = call i32 @bar()
----------------
snehasish wrote:
> rahmanl wrote:
> > nit: You can reuse this for the previous test case (the case where all landing pads are cold). You can still have two landing pads and make one of them configurable with a macro.
> > ```
> > hot:
> >   %2 = call i32 @bar()
> >   invoke void @_Z1fv()
> >           to label %exit unwind label %lpad2, !prof ![[PROF]]
> > ```
> > 
> > Just a suggestion. Using macros could make tests less readable too.
> It's an interesting idea but I had a couple of concerns so I left it as is
> * It's really easy to miss the macro since the substitution is for the profile metadata
> * We would need to invoke llc again with two version of the macro
SGTM. Thanks for considering.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96372



More information about the llvm-commits mailing list