[all-commits] [llvm/llvm-project] df4736: [RegAllocFast] properly handle STATEPOINT instruct...
dantrushin via All-commits
all-commits at lists.llvm.org
Tue May 11 03:27:51 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: df47368d406aa4b9aaa7dd49026a0eff9763e6ca
https://github.com/llvm/llvm-project/commit/df47368d406aa4b9aaa7dd49026a0eff9763e6ca
Author: Denis Antrushin <dantrushin at gmail.com>
Date: 2021-05-11 (Tue, 11 May 2021)
Changed paths:
M llvm/lib/CodeGen/RegAllocFast.cpp
A llvm/test/CodeGen/X86/statepoint-fastregalloc.mir
Log Message:
-----------
[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
More information about the All-commits
mailing list