HomePhabricator

RegAllocFast: Leave unassigned virtreg entries in map

Authored by MatzeB on Nov 6 2018, 10:57 PM.

Description

RegAllocFast: Leave unassigned virtreg entries in map

Set LiveReg::PhysReg to zero when freeing a register instead of
removing it from the entry from LiveRegMap. This way no iterators get
invalidated and we can avoid passing around and updating iterators all
over the place.

This does not change any allocator decisions. It is not completely NFC
because the arbitrary iteration order through LiveRegMap in
spillAll() changes so we may get a different order in those spill
sequences (the amount of spills does not change).

This is in preparation of https://reviews.llvm.org/D52010.

llvm-svn: 346298

Details

Committed
MatzeBNov 6 2018, 10:57 PM
Parents
rGb0ecbef4285b: RegAllocFast: Further cleanups; NFC
Branches
Unknown
Tags
Unknown