[PATCH] D55072: [SelectionDAG] Generate frame index for function arg without VReg if possible

Cherry Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 29 12:48:58 PST 2018


cherry created this revision.
Herald added subscribers: llvm-commits, arphaman, nhaehnle, jvesely.

For function argument, we used to copy it to a virtual register
if it is referenced outside the entry block. But for an argument
at a fixed frame index, we can use it directly without a virtual
register.

For STATEPOINT's liveness arg, this will make it encode the fixed
stack location directly into the stack map, without spilling to
a register.

This slightly improves -O0 code generation (by folding static
stack offset), without losing debuggability.


Repository:
  rL LLVM

https://reviews.llvm.org/D55072

Files:
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  test/CodeGen/AMDGPU/frame-index-elimination.ll
  test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll
  test/CodeGen/X86/statepoint-stackmap-format.ll
  test/CodeGen/X86/x86-32-intrcc.ll
  test/CodeGen/X86/x86-64-intrcc.ll
  test/DebugInfo/X86/dbg-declare-inalloca.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55072.175909.patch
Type: text/x-patch
Size: 14950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181129/3d315c54/attachment.bin>


More information about the llvm-commits mailing list