[PATCH] D149668: [ShrinkWrap] Use underlying object to rule out stack access.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 13:34:29 PDT 2023


fhahn updated this revision to Diff 518846.
fhahn added a comment.
Herald added subscribers: luke, pcwang-thead, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, MaskRay, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, kbarton, nemanjai.

Update remaining failing tests, remove dead Objs variable.

In D149668#4313246 <https://reviews.llvm.org/D149668#4313246>, @efriedma wrote:

> So the idea here is that things that are allocated before entry to the function can't point into the stack of the current function? The basic idea makes sense.
>
> I'm a little concerned about the interaction with byval/preallocated/inalloca arguments, which are, depending on the calling convention, arguably part of the current function's stack. Any thoughts there?

Thanks, I added a !Arg->hasPassPointeeByValueCopyAttr() check to catch those. Tests for with those attributes have been added in bc1c95d973b80d7ec7a15d4c5c5248952fc39153 <https://reviews.llvm.org/rGbc1c95d973b80d7ec7a15d4c5c5248952fc39153>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149668

Files:
  llvm/lib/CodeGen/ShrinkWrap.cpp
  llvm/test/CodeGen/AArch64/addsub.ll
  llvm/test/CodeGen/AArch64/arm64-shrink-wrapping.ll
  llvm/test/CodeGen/AArch64/combine-comparisons-by-cse.ll
  llvm/test/CodeGen/AArch64/csr-split.ll
  llvm/test/CodeGen/AArch64/shrink-wrap-byval-inalloca-preallocated.ll
  llvm/test/CodeGen/AArch64/taildup-cfi.ll
  llvm/test/CodeGen/PowerPC/branch-on-store-cond.ll
  llvm/test/CodeGen/PowerPC/more-dq-form-prepare.ll
  llvm/test/CodeGen/PowerPC/ppc64-sibcall-shrinkwrap.ll
  llvm/test/CodeGen/RISCV/hoist-global-addr-base.ll
  llvm/test/CodeGen/RISCV/pr51206.ll
  llvm/test/CodeGen/Thumb/thumb-shrink-wrapping.ll
  llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll
  llvm/test/CodeGen/X86/cmov.ll
  llvm/test/CodeGen/X86/copy-eflags.ll
  llvm/test/CodeGen/X86/csr-split.ll
  llvm/test/CodeGen/X86/i686-win-shrink-wrapping.ll
  llvm/test/CodeGen/X86/inline-asm-flag-output.ll
  llvm/test/CodeGen/X86/peep-test-5.ll
  llvm/test/CodeGen/X86/shrink-wrap-chkstk-x86_64.ll
  llvm/test/CodeGen/X86/statepoint-vector.ll
  llvm/test/DebugInfo/X86/merge_inlined_loc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149668.518846.patch
Type: text/x-patch
Size: 64696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230502/264d639a/attachment-0001.bin>


More information about the llvm-commits mailing list