[TableGen] Allow isAllocatable inheritence from any superclass
authorCarl Ritson <carl.ritson@amd.com>
Fri, 16 Jul 2021 03:13:29 +0000 (12:13 +0900)
committerCarl Ritson <carl.ritson@amd.com>
Fri, 16 Jul 2021 04:02:24 +0000 (13:02 +0900)
commitf5917e0312edacf1fe4cfebc532e3a78c854adee
tree24e5514f639306bd2f952663b958cced3e4cf302
parentd695d0d6f60528841ab8671cdccff85f889ca95d
[TableGen] Allow isAllocatable inheritence from any superclass

When setting Allocatable on a generated register class check all
superclasses and set Allocatable true if any superclass is
allocatable.

Without this change generated register classes based on an
allocatable class may end up unallocatable due to the topological
inheritance order.

This change primarily effects AMDGPU backend; however, there are
a few changes in MIPs GlobalISel register constraints as a result.

Reviewed By: kparzysz

Differential Revision: https://reviews.llvm.org/D105967
llvm/utils/TableGen/CodeGenRegisters.cpp