[PATCH] D63969: GlobalISel: Try to propagate the register bank in LegalizerHelper
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 19:41:28 PDT 2019
arsenm created this revision.
arsenm added reviewers: qcolombet, aemerson, aditya_nandakumar, paquette, volkan, dsanders.
Herald added subscribers: Petar.Avramovic, kristof.beyls, rovka, nhaehnle, wdng, jvesely.
This will allow more convenient usage from applyMapping. For cases
where source registers map to single source registers, it should be
simple to simply copy the source register's bank.
This might not work for outputs in general. It seems newly created
instructions are not automatically regbankselected, which leaves
registers without banks unless you find them. An observer for new
instructions/registers might be the solution, but for now the set of
operations I'm using this with doens't care.
Also legalize s16 add/sub/mul as an example case.
https://reviews.llvm.org/D63969
Files:
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
test/CodeGen/AMDGPU/GlobalISel/legalize-add.mir
test/CodeGen/AMDGPU/GlobalISel/legalize-mul.mir
test/CodeGen/AMDGPU/GlobalISel/legalize-sub.mir
test/CodeGen/AMDGPU/GlobalISel/regbankselect-add.s16.mir
test/CodeGen/AMDGPU/GlobalISel/regbankselect-mul.s16.mir
test/CodeGen/AMDGPU/GlobalISel/regbankselect-sub.s16.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63969.207185.patch
Type: text/x-patch
Size: 48818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190629/8cb8317a/attachment.bin>
More information about the llvm-commits
mailing list