[llvm-commits] [llvm] r112741 - /llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Sep 1 14:20:29 PDT 2010
On Sep 1, 2010, at 2:04 PM, Jim Grosbach wrote:
> + if (!physReg) {
> + TargetRegisterClass::iterator aoe = RC->allocation_order_end(*mf_);
> + TargetRegisterClass::iterator i = RC->allocation_order_begin(*mf_);
> + while (reservedRegs_.test(*i) && i != aoe)
> + ++i;
> + assert(i != aoe && "All registers reserved?!");
> + physReg = *i;
> + }
Hi Jim,
This bit should probably be a function since you're doing it twice.
Also, make sure you can handle register classes with an empty allocation order. They shouldn't occur here, but its better to get the assert when they do.
I would like to properly clean up the specification of allocation order, register classes, and reserved registers in the .td files, but for now allowing reserved registers in the allocation order is a good compromise.
/jakob
More information about the llvm-commits
mailing list