diff options
| author | 2011-09-23 17:34:19 -0700 | |
|---|---|---|
| committer | 2011-09-23 18:34:31 -0700 | |
| commit | ed3e930109e3f01804ca32cee4afe4f2d4b3f4d8 (patch) | |
| tree | 41c3ffd3fdade2244b4cd3824c98419edecbca86 /src/compiler/codegen/arm/ArmRallocUtil.cc | |
| parent | 8060925c45cc2607ab92390d7366c6c0cfdfe4bb (diff) | |
assert to DCHECK conversion
Also replaced static function defs with a STATIC macro to make normally
hidden functions visible to DCHECK's traceback listing). Additionally,
added some portions of the new type & size inference mechanism (but not
taking advantage of them yet).
Change-Id: Ib42a08777f28ab879d0df37617e1b77e3f09ba52
Diffstat (limited to 'src/compiler/codegen/arm/ArmRallocUtil.cc')
| -rw-r--r-- | src/compiler/codegen/arm/ArmRallocUtil.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/codegen/arm/ArmRallocUtil.cc b/src/compiler/codegen/arm/ArmRallocUtil.cc index 0908c6d429..3de0e79d4d 100644 --- a/src/compiler/codegen/arm/ArmRallocUtil.cc +++ b/src/compiler/codegen/arm/ArmRallocUtil.cc @@ -36,7 +36,7 @@ typedef struct RefCounts { } RefCounts; /* USE SSA names to count references of base Dalvik vRegs. */ -static void countRefs(CompilationUnit *cUnit, BasicBlock* bb, +STATIC void countRefs(CompilationUnit *cUnit, BasicBlock* bb, RefCounts* counts, bool fp) { MIR* mir; @@ -83,7 +83,7 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb, for (i=0; i< ssaRep->numUses; i++) { int origSreg = DECODE_REG( oatConvertSSARegToDalvik(cUnit, ssaRep->uses[i])); - assert(origSreg < cUnit->method->NumRegisters()); + DCHECK_LT(origSreg, cUnit->method->NumRegisters()); bool fpUse = ssaRep->fpUse ? ssaRep->fpUse[i] : false; if (fp == fpUse) { counts[origSreg].count++; @@ -96,7 +96,7 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb, } int origSreg = DECODE_REG( oatConvertSSARegToDalvik(cUnit, ssaRep->defs[i])); - assert(origSreg < cUnit->method->NumRegisters()); + DCHECK_LT(origSreg, cUnit->method->NumRegisters()); bool fpDef = ssaRep->fpDef ? ssaRep->fpDef[i] : false; if (fp == fpDef) { counts[origSreg].count++; @@ -107,14 +107,14 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb, } /* qsort callback function, sort descending */ -static int sortCounts(const void *val1, const void *val2) +STATIC int sortCounts(const void *val1, const void *val2) { const RefCounts* op1 = (const RefCounts*)val1; const RefCounts* op2 = (const RefCounts*)val2; return (op1->count == op2->count) ? 0 : (op1->count < op2->count ? 1 : -1); } -static void dumpCounts(const RefCounts* arr, int size, const char* msg) +STATIC void dumpCounts(const RefCounts* arr, int size, const char* msg) { LOG(INFO) << msg; for (int i = 0; i < size; i++) { |