AMDGPU: Fix debug info handling in post-RA bundler
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 14 Feb 2021 15:46:10 +0000 (10:46 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 16 Feb 2021 15:42:06 +0000 (10:42 -0500)
commitc320e8196ae67a4eaa72253ed9013dda28eaf390
tree4f98f68d736afbedf976b13db90bc664b250dd18
parent3c8bf29f14e45cdf4c5dc5edcb3bb2f02cc9f394
AMDGPU: Fix debug info handling in post-RA bundler

This was allowing debug instructions to break the bundling, which
would change scheduling behavior. Bundle debug info / kills inside
the bundle. This seems to work OK, although the asm printer doesn't
understand these in a bundle. This implicitly expects the memory
legalizer to unbundle. It would probably be slightly nicer to move
these after.

Rewrite the loop to be clearer and make sure we don't end a bundle on
a meta instruction, only allow them in between other valid bundle
instructions.
llvm/lib/Target/AMDGPU/SIPostRABundler.cpp
llvm/test/CodeGen/AMDGPU/post-ra-soft-clause-dbg-info.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/postra-bundle-memops.mir