nativeGen: Don't index into linked lists
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 29 Aug 2017 18:51:52 +0000 (14:51 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 29 Aug 2017 23:08:07 +0000 (19:08 -0400)
commit9d57d8c192cd455aa68a7a0c019df97f68ae015f
tree872227cdd8b163148d6c4548e0b6cc1d97d9ee4a
parent779b9e6965416ee08af6eb15354cf09e9f40e0d9
nativeGen: Don't index into linked lists

There were a couple places where we indexed into linked lists of
register names.  Replace these with arrays.

Reviewers: austin

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3893
compiler/nativeGen/RegAlloc/Graph/ArchX86.hs
compiler/nativeGen/X86/Regs.hs