[AMDGPU] Add TII::isIgnorableUse() to allow VOP rematerialization
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 12 Jul 2021 19:27:34 +0000 (12:27 -0700)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Wed, 14 Jul 2021 20:03:58 +0000 (13:03 -0700)
commit76b7d3432e38bb7690c3bbd4940786b5cb751b95
tree7e1d3e09a666b6fa2b7297c9aa5573ffdd5114ab
parentba2690b17b9e463b80a1d6c675e3d04fc2974083
[AMDGPU] Add TII::isIgnorableUse() to allow VOP rematerialization

Any def of EXEC prevents rematerialization of any VOP instruction
because of the physreg use. Create a callback to check if the
physreg use can be ingored to allow rematerialization.

Differential Revision: https://reviews.llvm.org/D105836
llvm/include/llvm/CodeGen/TargetInstrInfo.h
llvm/lib/CodeGen/LiveRangeEdit.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.h
llvm/test/CodeGen/AMDGPU/remat-sop.mir
llvm/test/CodeGen/AMDGPU/remat-vop.mir