[PATCH] D94232: [LoopRotate] Add PrepareForLTO stage, avoid rotating with inline cands (WIP).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 06:41:33 PST 2021


fhahn added a comment.

In D94232#2506684 <https://reviews.llvm.org/D94232#2506684>, @xbolva00 wrote:

> In D94232#2506618 <https://reviews.llvm.org/D94232#2506618>, @nikic wrote:
>
>> Just FYI this had a pretty massive (positive) impact on code size: https://llvm-compile-time-tracker.com/compare.php?from=4d3081331ad854e0bff5032c818ec6414fb974c0&to=83daa49758a12d585fe2d9a64448e54d91bcfaff&stat=size-text
>> And presumably also directly related to that, a large compile-time improvement: https://llvm-compile-time-tracker.com/compare.php?from=4d3081331ad854e0bff5032c818ec6414fb974c0&to=83daa49758a12d585fe2d9a64448e54d91bcfaff&stat=instructions
>
> Wow. 
> What about runtime performance, eg. mafft? No changes?

Thanks for the heads-up.

Unfortunately I think this is an unintended bug. It looks like the original code did not skip calls that are not actual calls. With the patch, LoopRotation would also be skipped if the header contains intrinsic calls, like `@llvm.dbg.*` calls. Those should not block rotation though (there's nothing to inline). I pushed a fix, so we do not consider calls that are not lowered to calls as inline candidates: 3747b69b5312 <https://reviews.llvm.org/rG3747b69b531299f7a2a0289b8a59ac7234e47d4f>

I expect this should revert back the improvements with `-g`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94232



More information about the llvm-commits mailing list