[PATCH] D140672: [TwoAddressInstruction] Contrain RegClass when processing a statepoint
Denis Antrushin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 26 06:29:39 PST 2022
dantrushin accepted this revision.
dantrushin added a comment.
This revision is now accepted and ready to land.
LGTM, but clean test up before committing.
================
Comment at: llvm/test/CodeGen/AArch64/statepoint-twoaddr.mir:37
+ $x2 = COPY killed %2
+ %4:gpr64sp = STATEPOINT 2882400000, 0, 4, killed %3, undef $x0, killed $x1, killed $x2, undef $x3, 2, 125, 2, 4, 2, 47, 2, 0, 2, 2, 2, 0, 2, 17, 2, 1, 2, 13, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 1, 4, %stack.0, 0, 2, 0, 2, 4278124286, 2, 4, 2, 4278124286, 2, 7, 2, 0, 2, 4, 2, 0, 2, 7, 2, 0, 2, 1, 2, 2, 2, 19, 2, 0, 2, 3, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 2, killed %0(tied-def 0), 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $x0, implicit-def dead early-clobber $lr :: (volatile load store (s32) on %stack.0)
+ %5:gpr64sp = ADDXri killed %4, 16, 0
----------------
Please remove redundant constant arguments.
You don't need 47 constant deopt arg in this test. I would guess you don't need those `undef` call arguments(or even _any_ of them?).
At a glance only `%0` is essential for the test.
Just in case, format of statepoint MI is as follows:
```
/// <id>, <num patch bytes>, <num call arguments>, <call target>,
/// [call arguments...],
/// <StackMaps::ConstantOp>, <calling convention>,
/// <StackMaps::ConstantOp>, <statepoint flags>,
/// <StackMaps::ConstantOp>, <num deopt args>, [deopt args...],
/// <StackMaps::ConstantOp>, <num gc pointers>, [gc pointers...],
/// <StackMaps::ConstantOp>, <num gc allocas>, [gc allocas...]
/// <num entries in gc map>, <base/derived indices...>
```
Where `StackMaps::ConstantOp` is literal '2' above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140672/new/
https://reviews.llvm.org/D140672
More information about the llvm-commits
mailing list