diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-14 13:23:03 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-14 13:23:03 +0000 |
commit | 86a48bfea137500c525fabd6ee5bfdfadef3144b (patch) | |
tree | a5f8db14827f88772bfac37549c0b4f7dba26025 /compiler_and_linker/unsorted/Alias.c | |
parent | 5f3c8265f2717f72d68d8eb170fbe2dd114d7b76 (diff) | |
download | MWCC-86a48bfea137500c525fabd6ee5bfdfadef3144b.tar.gz MWCC-86a48bfea137500c525fabd6ee5bfdfadef3144b.zip |
a little more cleanup
Diffstat (limited to 'compiler_and_linker/unsorted/Alias.c')
-rw-r--r-- | compiler_and_linker/unsorted/Alias.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/compiler_and_linker/unsorted/Alias.c b/compiler_and_linker/unsorted/Alias.c index b86fb41..8223bf4 100644 --- a/compiler_and_linker/unsorted/Alias.c +++ b/compiler_and_linker/unsorted/Alias.c @@ -309,30 +309,24 @@ static int addresspropagatestouse(int candidateID, int useID) { if (candidate_pcode->block == use_pcode->block && precedes(candidate_pcode, use_pcode)) { for (scan = candidate_pcode->nextPCode; scan && scan != use_pcode; scan = scan->nextPCode) { - op = scan->args; - i = scan->argCount; - while (i--) { + for (op = scan->args, i = scan->argCount; i--; op++) { if (op->kind == PCOp_REGISTER && op->arg == RegClass_GPR && (op->data.reg.effect & EffectWrite) && op->data.reg.reg == reg) return 1; - op++; } } } else { if (!bitvectorgetbit(candidateID, propinfo[use_pcode->block->blockIndex].vec8)) { if (bitvectorgetbit(candidate_pcode->defID, usedefinfo[use_pcode->block->blockIndex].defvec8)) { for (scan = use_pcode->block->firstPCode; scan && scan != use_pcode; scan = scan->nextPCode) { - op = scan->args; - i = scan->argCount; - while (i--) { + for (op = scan->args, i = scan->argCount; i--; op++) { if (op->kind == PCOp_REGISTER && op->arg == RegClass_GPR && (op->data.reg.effect & EffectWrite) && op->data.reg.reg == reg) return 1; - op++; } } } else { @@ -343,15 +337,12 @@ static int addresspropagatestouse(int candidateID, int useID) { for (scan = use_pcode->block->firstPCode; scan; scan = scan->nextPCode) { if (scan == use_pcode) break; - op = scan->args; - i = scan->argCount; - while (i--) { + for (op = scan->args, i = scan->argCount; i--; op++) { if (op->kind == PCOp_REGISTER && op->arg == RegClass_GPR && (op->data.reg.effect & EffectWrite) && op->data.reg.reg == reg) return 1; - op++; } } } @@ -538,7 +529,7 @@ void gather_alias_info(void) { if ( (!(pcode->flags & (fIsWrite | fPCodeFlag40000)) || op != pcode->args) && op->kind == PCOp_REGISTER && - (RegClass) op->arg == RegClass_GPR && + op->arg == RegClass_GPR && (op->data.reg.effect & EffectRead) ) { alias_array[aliases_idx] = NULL; |