[llvm-commits] [llvm] r112741 - /llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp

Jim Grosbach grosbach at apple.com
Wed Sep 1 14:47:26 PDT 2010


On Sep 1, 2010, at 2:20 PM, Jakob Stoklund Olesen wrote:

> 
> 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.

and done in r112743.



More information about the llvm-commits mailing list