Hi Evan,
Ok. Everyone has different idea about "easy".
I second your opinion that it is not very easy to use and it is very tightly coupled with the current linear scan register allocator implementation.
But VirtRegMap is going to be remove one of these days.
When are you going to do that? Are you going to remove it from the source tree? Will it be replaced with something similar, e.g. with another kind of spiller and register tracking mechamism?
Please keep in mind that some other allocators being currently developed use VirtRegMap with all its pros and cons. These allocators include an iterated coalescing graph colorging register allocator (Lang), a chordal graph register allocator (Fernando), a puzzle solving register allocator (Fernando), a PQBP register allocaor (Lang) and an extended linear scan register allocator (Roman). May be there are some other allocators as well.
And BTW, some other parts of the LLVM API related to register allocation are also used by other register allocators. So, any major changes to them may break them as well.
Therefore it would be nice to get a better understanding and common view on how to proceed with the VirtRegMap with regard to removing, improving or replacing it with something different.
Thanks,
Roman