Page MenuHomePhabricator

TableGen/GlobalISel: Don't reconstruct CodeGenRegBank

Authored by arsenm on Jan 14 2020, 11:03 AM.



The maps for dealing with the relationships between different register
classes and subregister indexes rely on unique pointers for every
class/index. By constructing a second copy of CodeGenRegBank, two
different pointer values existed for a given subregister depending on
where you were querying.

Use the existing CodeGenRegBank owned by the CodeGenTarget instead of
constructing a second copy. This avoids incorrectly failing map
lookups in a future change.

Diff Detail

Event Timeline

arsenm created this revision.Jan 14 2020, 11:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2020, 11:03 AM
This revision is now accepted and ready to land.Jan 14 2020, 1:34 PM