[PATCH] D116213: [ARM] fix bug causing shrinkwrapping not always being off using PAC

Ties Stuij via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 13:42:07 PST 2022


stuij updated this revision to Diff 398731.
stuij added a comment.

I did some more testing, and unfortunately we can't rely on LRSpilled being set correctly.

LRSpilled is being set by ARMFrameLowering::determineCalleeSaves, which is called a couple of times throughout the code. I experimented a bit, and it's a bit dirty to call it from within enableShrinkWrapping, as you need to cast away the const on MachineFunction, and it's a very big slab of code that clearly triggers some side effect (besides setting LRSPilled) as calling it here will make some tests fail. Looking at the failed tests (not just PACBTI tests) it doesn't look like anything wrong is going on, but it's all a bit too icky for my taste.

So I reverted to the previous state, as it's not worth the time-effort to possibly eek out a slight performance edge for a temporary stop-gap which we'll remove once we fix the issue proper. I feel I already spent a bit too much time on this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116213

Files:
  llvm/lib/Target/ARM/ARMFrameLowering.cpp
  llvm/test/CodeGen/Thumb2/pacbti-m-outliner-3.ll
  llvm/test/CodeGen/Thumb2/pacbti-m-outliner-4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116213.398731.patch
Type: text/x-patch
Size: 4949 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220110/b078b453/attachment.bin>


More information about the llvm-commits mailing list