[LLVMdev] Using VirtRegMap

Evan Cheng evan.cheng at apple.com
Fri Sep 19 09:37:20 PDT 2008


On Sep 19, 2008, at 2:41 AM, Matt Elder wrote:

> 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
> TargetInstrInfo?

Please avoid using VirtRegMap. It's very tied to the current register  
allocation pieces and not easily reusable. One of my mission in life  
is to kill it.

Evan

>
>
> Thanks,
> - Matt Elder
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list