diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-11 22:29:53 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-11 22:29:53 +0000 |
commit | 0bec4f557a96e1a40437cf5af20cc78a5eec8a63 (patch) | |
tree | c1e05ec804c43aa5a8f5f21b0ed02d0587d29563 /compiler_and_linker/unsorted/Alias.c | |
parent | aec1b8dddc68ecb8288ec6132932e4c7b4bca09f (diff) | |
download | MWCC-0bec4f557a96e1a40437cf5af20cc78a5eec8a63.tar.gz MWCC-0bec4f557a96e1a40437cf5af20cc78a5eec8a63.zip |
getting closer
Diffstat (limited to 'compiler_and_linker/unsorted/Alias.c')
-rw-r--r-- | compiler_and_linker/unsorted/Alias.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/compiler_and_linker/unsorted/Alias.c b/compiler_and_linker/unsorted/Alias.c index 4a2f176..d8d883d 100644 --- a/compiler_and_linker/unsorted/Alias.c +++ b/compiler_and_linker/unsorted/Alias.c @@ -257,7 +257,7 @@ static int addresspropagatestouse(int candidateID, int useID) { CError_ASSERT(478, object->otype == OT_OBJECT); - if ((candidate_pcode->flags & (fPCodeFlag2 | fPCodeFlag4)) && (candidate_pcode->flags & fPCodeFlag2000000)) { + if ((candidate_pcode->flags & (fIsRead | fIsWrite)) && (candidate_pcode->flags & fUpdatesPtr)) { reg = candidate_pcode->args[1].data.reg.reg; offset = 0; flag24 = 1; @@ -282,7 +282,7 @@ static int addresspropagatestouse(int candidateID, int useID) { } if ( - !(use_pcode->flags & (fPCodeFlag2 | fPCodeFlag4)) && + !(use_pcode->flags & (fIsRead | fIsWrite)) && use_pcode->op != PC_ADDI && use_pcode->op != PC_ADD && use_pcode->op != PC_ADDIS @@ -293,7 +293,7 @@ static int addresspropagatestouse(int candidateID, int useID) { } if ( - (use_pcode->flags & (fPCodeFlag4 | fPCodeFlag40000)) && + (use_pcode->flags & (fIsWrite | fPCodeFlag40000)) && use_pcode->args[0].kind == PCOp_REGISTER && use_pcode->args[0].arg == RegClass_GPR && use_pcode->args[0].data.reg.reg == reg && @@ -363,7 +363,7 @@ static int addresspropagatestouse(int candidateID, int useID) { add_alias_member(worst_case, make_alias(object, 0, 0)); } - if (use_pcode->flags & (fPCodeFlag2 | fPCodeFlag4)) + if (use_pcode->flags & (fIsRead | fIsWrite)) size = nbytes_loaded_or_stored_by(use_pcode); if (use_pcode->args[2].kind == PCOp_REGISTER) { @@ -435,7 +435,7 @@ static int addresspropagatestouse(int candidateID, int useID) { use_pcode->op == PC_ADDI || use_pcode->op == PC_ADD || use_pcode->op == PC_ADDIS || - ((candidate_pcode->flags & (fPCodeFlag2 | fPCodeFlag4)) && (candidate_pcode->flags & fPCodeFlag2000000)) + ((candidate_pcode->flags & (fIsRead | fIsWrite)) && (candidate_pcode->flags & fUpdatesPtr)) ) recursive_propagation = 1; } @@ -454,7 +454,7 @@ static int addresspropagatestouse(int candidateID, int useID) { use_pcode->op == PC_ADDI || use_pcode->op == PC_ADD || use_pcode->op == PC_ADDIS || - ((use_pcode->flags & (fPCodeFlag2 | fPCodeFlag4)) && (use_pcode->flags & fPCodeFlag2000000)) + ((use_pcode->flags & (fIsRead | fIsWrite)) && (use_pcode->flags & fUpdatesPtr)) ) { if (alias->type == AliasType2) add_alias_member(worst_case, alias); @@ -519,15 +519,15 @@ void gather_alias_info(void) { bitvectorcopy(myvec, usedefinfo[block->blockIndex].defvec8, number_of_Defs); for (pcode = block->firstPCode; pcode; pcode = pcode->nextPCode) { - if (pcode->flags & (fPCodeFlag2 | fPCodeFlag4 | fPCodeFlag20000 | fPCodeFlag40000)) { + if (pcode->flags & (fIsRead | fIsWrite | fPCodeFlag20000 | fPCodeFlag40000)) { if (!pcode->alias) { pcode->alias = worst_case; } else { if ((pcode->alias->type == AliasType0 || pcode->alias->type == AliasType1) && pcode->alias->size == nbytes_loaded_or_stored_by(pcode)) { - pcode->flags &= ~fPCodeFlag20; + pcode->flags &= ~fIsPtrOp; } else { - pcode->flags |= fPCodeFlag20; + pcode->flags |= fIsPtrOp; } if (pcode->alias != worst_case) { @@ -536,7 +536,7 @@ void gather_alias_info(void) { op = pcode->args; for (i = 0; i < pcode->argCount; i++, op++) { if ( - (!(pcode->flags & (fPCodeFlag4 | fPCodeFlag40000)) || op != pcode->args) && + (!(pcode->flags & (fIsWrite | fPCodeFlag40000)) || op != pcode->args) && op->kind == PCOp_REGISTER && (RegClass) op->arg == RegClass_GPR && (op->data.reg.effect & EffectRead) @@ -576,7 +576,7 @@ void gather_alias_info(void) { } if (alias_choice == worst_case) { - pcode->flags |= fPCodeFlag20; + pcode->flags |= fIsPtrOp; if (pcode->alias->type == AliasType2) add_alias_member(worst_case, pcode->alias); else @@ -589,7 +589,7 @@ void gather_alias_info(void) { } } } else { - if ((pcode->flags & fPCodeFlag8) && !pcode->alias) + if ((pcode->flags & fIsCall) && !pcode->alias) pcode->alias = worst_case; } @@ -607,7 +607,7 @@ void gather_alias_info(void) { } else { for (block = pcbasicblocks; block; block = block->nextBlock) { for (pcode = block->firstPCode; pcode; pcode = pcode->nextPCode) { - if ((pcode->flags & (fPCodeFlag2 | fPCodeFlag4 | fPCodeFlag8 | fPCodeFlag20000 | fPCodeFlag40000)) && !pcode->alias) + if ((pcode->flags & (fIsRead | fIsWrite | fIsCall | fPCodeFlag20000 | fPCodeFlag40000)) && !pcode->alias) pcode->alias = worst_case; } } |