[PATCH] D124631: [TwoAddressInstructionPass] Special processing of STATEPOINT instruction.
Denis Antrushin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 28 11:44:09 PDT 2022
dantrushin created this revision.
dantrushin added reviewers: skatkov, reames, foad, qcolombet, MatzeB.
Herald added subscribers: mstorsjo, pengfei, hiraditya.
Herald added a project: All.
dantrushin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
STATEPOINT is a special pseudo instruction which uses tied registers
to express possible pointer value (held in VReg) change during call,
which is invisible to compiler by other means.
Important STATEPOINT property is that its incoming (tied) use operand
always killed at STATEPOINT and all following instructions can use only
(tied) def produced by STATEPOINT. (Essentially, they represent different
segments of the same Live Range).
This means that when transforming it into two-address form, no extra
COPY instruction is necessary.
There is no MIR differences afer Register Coalescer with and without this
patch, but Register Allocator can behave differently as test change
demonstrate. The reason is shorter (more precise) live range size for
registers.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124631
Files:
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
llvm/test/CodeGen/X86/statepoint-invoke-ra.mir
llvm/test/CodeGen/X86/statepoint-vreg-unlimited-tied-opnds.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124631.425865.patch
Type: text/x-patch
Size: 37294 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220428/67253195/attachment.bin>
More information about the llvm-commits
mailing list