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/LoopDetection.c | |
parent | aec1b8dddc68ecb8288ec6132932e4c7b4bca09f (diff) | |
download | MWCC-0bec4f557a96e1a40437cf5af20cc78a5eec8a63.tar.gz MWCC-0bec4f557a96e1a40437cf5af20cc78a5eec8a63.zip |
getting closer
Diffstat (limited to 'compiler_and_linker/unsorted/LoopDetection.c')
-rw-r--r-- | compiler_and_linker/unsorted/LoopDetection.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler_and_linker/unsorted/LoopDetection.c b/compiler_and_linker/unsorted/LoopDetection.c index 5df2524..1d8244a 100644 --- a/compiler_and_linker/unsorted/LoopDetection.c +++ b/compiler_and_linker/unsorted/LoopDetection.c @@ -15,7 +15,7 @@ static BlockList *loopheaders; static int nloopheaders; static PCodeBlock **loopstack; BitVector *LoopTemp; -void *LoopList_First; +struct LoopList *LoopList_First; static void computedominators(void) { int i; @@ -316,7 +316,7 @@ void insertpreheaderblock(Loop *loop) { if ( (!block28->nextBlock || !bitvectorgetbit(block28->nextBlock->blockIndex, loop->memberblocks)) && block28->lastPCode && - (block28->lastPCode->flags & fPCodeFlag1) && + (block28->lastPCode->flags & fIsBranch) && block28->lastPCode->op != PC_BDNZ ) { i = block28->lastPCode->argCount; @@ -851,10 +851,10 @@ void analyzeloop(Loop *loop) { if (pcode->op == PC_BCTRL || pcode->op == PC_BCTR || pcode->op == PC_BCCTR || pcode->op == PC_MTCTR || pcode->op == PC_MFCTR) { loop->x4E = 1; - } else if (pcode->flags & fPCodeFlag2) { + } else if (pcode->flags & fIsRead) { if (pcode->op == PC_LBZX || pcode->op == PC_LHZX || pcode->op == PC_LHAX || pcode->op == PC_LWZX || pcode->op == PC_LFSX || pcode->op == PC_LFDX) loop->x53 = 1; - } else if (pcode->flags & fPCodeFlag4) { + } else if (pcode->flags & fIsWrite) { if (pcode->op == PC_STBX || pcode->op == PC_STHX || pcode->op == PC_STWX || pcode->op == PC_STFSX || pcode->op == PC_STFDX) loop->x54 = 1; } else { @@ -883,4 +883,3 @@ void analyzeloopsinflowgraph(void) { if (loopsinflowgraph) analyzeloops(loopsinflowgraph); } - |