This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Use a callback to compute constrained reg class for unallocatble registers
ClosedPublic

Authored by tstellar on Apr 23 2018, 2:47 PM.

Details

Summary

constrainOperandRegClass() currently fails if it tries to constrain the
register class of an operand that is defeined with an unallocatable register
class. This patch resolves this by adding a target callback to compute
register constriants in this case.

This is required by the AMDGPU because many of its instructions have source opreands
defined with the unallocatable register classe VS_32 which is a union of two allocatable
register classes VGPR_32 and SReg_32.

Diff Detail

Event Timeline

tstellar created this revision.Apr 23 2018, 2:47 PM

Hi Tom,
This looks fine to me..

This revision is now accepted and ready to land.Apr 24 2018, 12:58 PM
This revision was automatically updated to reflect the committed changes.