From 0bec4f557a96e1a40437cf5af20cc78a5eec8a63 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 11 Jan 2023 22:29:53 +0000 Subject: getting closer --- compiler_and_linker/unsorted/LoopDetection.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'compiler_and_linker/unsorted/LoopDetection.c') 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); } - -- cgit v1.2.3