[PATCH] D129677: Disable machine function splitting for functions with inline asm br

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 14:27:08 PDT 2022


nickdesaulniers added a comment.

In D129677#3653271 <https://reviews.llvm.org/D129677#3653271>, @adriantong1024 wrote:

> In D129677#3653221 <https://reviews.llvm.org/D129677#3653221>, @nickdesaulniers wrote:
>
>> In D129677#3653097 <https://reviews.llvm.org/D129677#3653097>, @adriantong1024 wrote:
>>
>>> The problem this patch is trying to fix is discovered on AArch64 where the conditional branch b.ge is too short after MFS places hot and cold blocks apart.
>>
>> Isn't it straightforward to change b.ge to b.lt to the other branch destination, then b (no condition) to the label?
>
> We can do this. I am slightly worried about performance as this is in a performance critical part of the code.

Generally, `asm goto` is modeled as the indirect branches being taken are the exceptional cases. So the indirect branch targets should be treated as if they were cold. If they're moved far away...good.

Otherwise if that's surprising for that code, it sounds like machine function splitting should be disabled for that function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129677



More information about the llvm-commits mailing list