From 86a48bfea137500c525fabd6ee5bfdfadef3144b Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 14 Jan 2023 13:23:03 +0000 Subject: a little more cleanup --- compiler_and_linker/unsorted/Alias.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'compiler_and_linker/unsorted/Alias.c') 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; -- cgit v1.2.3