[LLVMdev] Using VirtRegMap

Matt Elder elder at cs.wisc.edu
Fri Sep 19 02:41:19 PDT 2008

I'm trying to piece together a few assignments for a graduate-level 
compilers class using LLVM; among these is a register allocator. I'd 
like to provide a register allocator that, given a partially-allocated 
VirtRegMap, will perform trivial register allocation (as in 
RegAllocSimple) on the remaining, unmapped virtual registers.

To make a long story short, I want to map a single virtual register to 
various physical registers at different times, keeping the relevant 
value in memory all along. Can VirtRegMap do this cleanly, or should I 
avoid this abstraction and issue stores and loads manually, through 

- Matt Elder

More information about the llvm-dev mailing list