HomePhabricator

[TableGen][GlobalISel] Account for HwMode in RegisterBank register sizes

Authored by lewis-revill on Mar 18 2020, 12:50 PM.

Description

[TableGen][GlobalISel] Account for HwMode in RegisterBank register sizes

This patch generates TableGen descriptions for the specified register
banks which contain a list of register sizes corresponding to the
available HwModes. The appropriate size is used during codegen according
to the current HwMode. As this HwMode was not available on generation,
it is set upon construction of the RegisterBankInfo class. Targets
simply need to provide the HwMode argument to the
<target>GenRegisterBankInfo constructor.

The RISC-V RegisterBankInfo constructor has been updated accordingly
(plus an unused argument removed).

Differential Revision: https://reviews.llvm.org/D76007