diff options
| author | 2011-10-07 14:02:25 -0700 | |
|---|---|---|
| committer | 2011-10-07 14:16:01 -0700 | |
| commit | 6825326abfef92d4e1bf6afddef1a319aa18d08c (patch) | |
| tree | 1706bf3e0bbdb9f7a704140f70011c1b362fa294 /src/compiler/codegen/arm/ArmRallocUtil.cc | |
| parent | a43cb5e8fb29989dbb986b9b91a68cda150aa3c8 (diff) | |
Reg utility fix
Long ago in a galaxy far away, there was a trace compiler that
handled short code fragments with a small, sparse and variable
set of temp registers. In that situation, doing linear reg
lookups wasn't terrible. In the new world that has a fixed and
packed set of registers, a linear search is unnecessary, foolish
and wasteful. [P.S. perf showed that roughly 25% of all
compilation time was spent doing register manipulation!]
Change-Id: I6f23d9f70367fb4139cc28a27fd9fdf8beffa270
Diffstat (limited to 'src/compiler/codegen/arm/ArmRallocUtil.cc')
| -rw-r--r-- | src/compiler/codegen/arm/ArmRallocUtil.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/codegen/arm/ArmRallocUtil.cc b/src/compiler/codegen/arm/ArmRallocUtil.cc index 94852e391f..ed8a5b2ab3 100644 --- a/src/compiler/codegen/arm/ArmRallocUtil.cc +++ b/src/compiler/codegen/arm/ArmRallocUtil.cc @@ -322,3 +322,9 @@ extern RegLocation oatGetReturnAlt(CompilationUnit* cUnit) oatMarkInUse(cUnit, r1); return res; } + +extern RegisterInfo* oatGetRegInfo(CompilationUnit* cUnit, int reg) +{ + return FPREG(reg) ? &cUnit->regPool->FPRegs[reg & FP_REG_MASK] + : &cUnit->regPool->coreRegs[reg]; +} |