HomePhabricator

[RegAllocFast] properly handle STATEPOINT instruction.

Authored by dantrushin on Mar 24 2021, 8:48 AM.

Description

[RegAllocFast] properly handle STATEPOINT instruction.

STATEPOINT is a fancy and complex pseudo instruction which
has both tied defs and regmask operand.

Basic FastRA algorithm is as follows:

  1. Mark registers used by defs as free
  2. If instruction has regmask operand displace clobbered registers according to regmask.
  3. Assign registers for use operands.

In case of tied defs step 1 is replaced with allocation of registers
for them. But regmask is still processed, which may displace already
allocated registers. As a result, tied use and def will get assigned
to different registers.

This patch makes FastRA to process instruction's RegMask (if any) when
checking for physical registers interference.
That way tied operands won't get registers clobbered by regmask.

Reviewed By: arsenm, skatkov
Differential Revision: https://reviews.llvm.org/D99284

Details

Committed
dantrushinMay 11 2021, 3:27 AM
Reviewer
arsenm
Differential Revision
D99284: [RegAllocFast] properly handle STATEPOINT instruction.
Parents
rG3b873831c439: [AMDGPU] Add some GFX10.3 testing. NFC.
Branches
Unknown
Tags
Unknown