[llvm] [AMDGPU] Improve isBasicBlockPrologue helper function (PR #69924)
Christudasan Devadasan via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 11:13:47 PDT 2023
cdevadas wrote:
"I don't have strong preference which way we should go (either always split block or the change here). But it is important it should work in all cases we have seen (e.g. livenrange-split might still insert vector instruction before end_cf even it is a terminator.)"
I have a patch for it that introduces a separate target COPY opcode for liverange split (say AMDGPU::LR_SPLIT_COPY).
The patch also needed a fixup in the VirtRegMatrix to detect the new copy opcode by replacing "MI.isIdentityCopy()" with a target hook "TII->isIdentityCopyInstr(MI)".
But a few other tests including X86 failed as the copy-like opcodes will also be included.
I will post it as a follow-up patch as we don't have a failing case directly.
The live-range split issue occurs only when we apply https://reviews.llvm.org/D145329.
This patch passed in our internal testing (PSDB) and landing it would unblock my ongoing work related to wwm-allocation and a major issue observed in a customer code.
"We definitely want a test for such change, a '.ll' test is always helpful for revisiting the issue again."
Like I said earlier, we don't have a ready .ll test. I will try to get one forcing some reg-constraints.
https://github.com/llvm/llvm-project/pull/69924
More information about the llvm-commits
mailing list