1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Move virtual function call out of loop to speed up getFreePhysReg by about

20%, shaving 0.1s off hbd compile time on my g5.  Yay.

llvm-svn: 18592
This commit is contained in:
Nate Begeman 2004-12-07 05:25:53 +00:00
parent d50c86f078
commit 85a2e38a56

View File

@ -608,8 +608,8 @@ unsigned RA::getFreePhysReg(LiveInterval* cur)
const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(cur->reg);
unsigned freeReg = 0;
for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_);
i != rc->allocation_order_end(*mf_); ++i) {
for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_),
e = rc->allocation_order_end(*mf_); i != e; ++i) {
unsigned reg = *i;
if (prt_->isRegAvail(reg) &&
(!freeReg || inactiveCounts[freeReg] < inactiveCounts[reg]))