HomePhabricator

[TableGen][GlobalISel] Rework RegisterBankEmitter for easier const correctness.

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

Description

[TableGen][GlobalISel] Rework RegisterBankEmitter for easier const correctness.

This patch rewrites the RegisterBankEmitter class to derive
RegisterClassHierarchy from CodeGenTarget::getRegBank() rather than
constructing our own copy. All are now accessed through a const
reference.

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