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

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 18:27:48 PST 2021


snehasish marked 2 inline comments as done.
snehasish added a comment.

Thanks for the review.



================
Comment at: llvm/test/CodeGen/X86/machine-function-splitter.ll:206
+
+hot:
+  %2 = call i32 @bar()
----------------
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


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