[all-commits] [llvm/llvm-project] 4e2b4f: [ShrinkWrap] Use underlying object to rule out sta...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed May 3 01:29:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e2b4f97a09500fb6ceb4f077c492fac056a6a0a
      https://github.com/llvm/llvm-project/commit/4e2b4f97a09500fb6ceb4f077c492fac056a6a0a
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-05-03 (Wed, 03 May 2023)

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

  Log Message:
  -----------
  [ShrinkWrap] Use underlying object to rule out stack access.

Allow shrink-wrapping past memory accesses that only access globals or
function arguments. This patch uses getUnderlyingObject to try to
identify the accessed object by a given memory operand. If it is a
global or an argument, it does not access the stack of the current
function and should not block shrink wrapping.

Note that the caller's stack may get accessed when passing an argument
via the stack, but not the stack of the current function.

This addresses part of the TODO from D63152.

Reviewed By: thegameg

Differential Revision: https://reviews.llvm.org/D149668




More information about the All-commits mailing list