Page MenuHomePhabricator

[SelectionDAG] Generate frame index for function arg without VReg if possible
Needs ReviewPublic

Authored by cherry on Nov 29 2018, 12:48 PM.

Details

Summary

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.

Diff Detail

Event Timeline

cherry created this revision.Nov 29 2018, 12:48 PM
cherry marked an inline comment as done.Nov 29 2018, 12:51 PM
cherry added inline comments.
test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll
1

This test was intended to test that a callee-save register is spilled before the invoke. Now it no longer uses the callee-save register.

reames resigned from this revision.Mar 25 2020, 11:20 AM