diff options
author | Ash Wolf <ninji@wuffs.org> | 2022-12-29 12:32:55 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2022-12-29 12:32:55 +0000 |
commit | fcfbafff31869ed808bff0639532db1828660e92 (patch) | |
tree | 7425b346b031c4cb47a06250b3f6f950374d44ae /compiler_and_linker/unsorted/LoopOptimization.c | |
parent | bc1321735c15104ffad195e1509cab5f3a044260 (diff) | |
download | MWCC-fcfbafff31869ed808bff0639532db1828660e92.tar.gz MWCC-fcfbafff31869ed808bff0639532db1828660e92.zip |
dump lots more code
Diffstat (limited to 'compiler_and_linker/unsorted/LoopOptimization.c')
-rw-r--r-- | compiler_and_linker/unsorted/LoopOptimization.c | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/compiler_and_linker/unsorted/LoopOptimization.c b/compiler_and_linker/unsorted/LoopOptimization.c index 327d7e4..1c0b905 100644 --- a/compiler_and_linker/unsorted/LoopOptimization.c +++ b/compiler_and_linker/unsorted/LoopOptimization.c @@ -145,8 +145,7 @@ static void skiplooptest(Loop *loop) { preheader = loop->preheader; lastInstr = loop->body->lastPCode; -#line 340 - CError_ASSERT(lastInstr->args[2].kind == PCOp_LABEL); + CError_ASSERT(340, lastInstr->args[2].kind == PCOp_LABEL); label = lastInstr->args[2].data.label.label; preheader->lastPCode->args[0].data.label.label = label; @@ -166,8 +165,7 @@ static void skiplooptest(Loop *loop) { while (1) { instr = loop->body->firstPCode; -#line 369 - CError_ASSERT(instr); + CError_ASSERT(369, instr); if (instr->op == PC_CMP || instr->op == PC_CMPI || instr->op == PC_CMPLI || instr->op == PC_CMPL) break; @@ -204,12 +202,9 @@ static void unrollloop(Loop *loop) { newBlock->firstPCode = newBlock->lastPCode = NULL; for (i = 0; i < factor - 1; i++) { firstInstr = loop->body->firstPCode; -#line 448 - CError_ASSERT(firstInstr); - if (firstInstr->op != PC_CMP && firstInstr->op != PC_CMPL && firstInstr->op != PC_CMPI && firstInstr->op != PC_CMPLI) { -#line 450 - CError_FATAL(); - } + CError_ASSERT(448, firstInstr); + if (firstInstr->op != PC_CMP && firstInstr->op != PC_CMPL && firstInstr->op != PC_CMPI && firstInstr->op != PC_CMPLI) + CError_FATAL(450); for (instr = firstInstr->nextPCode; instr && !(instr->flags & fPCodeFlag1); instr = instr->nextPCode) appendpcode(newBlock, copypcode(instr)); @@ -236,8 +231,7 @@ void pccomputepredecessors1(PCodeBlock *block) { for (succ = block->successors; succ; succ = succ->nextLink) { if (!succ->block) { -#line 496 - CError_FATAL(); + CError_FATAL(496); } else { for (pred = succ->block->predecessors; pred; pred = pred->nextLink) { if (pred->block == block) @@ -427,12 +421,9 @@ static void unrollloopconditional(Loop *loop) { } firstInstr = loop->body->firstPCode; -#line 762 - CError_ASSERT(firstInstr != NULL); - if (firstInstr->op != PC_CMP && firstInstr->op != PC_CMPL && firstInstr->op != PC_CMPI && firstInstr->op != PC_CMPLI) { -#line 764 - CError_FATAL(); - } + CError_ASSERT(762, firstInstr != NULL); + if (firstInstr->op != PC_CMP && firstInstr->op != PC_CMPL && firstInstr->op != PC_CMPI && firstInstr->op != PC_CMPLI) + CError_FATAL(764); for (instr = firstInstr->nextPCode; instr && !(instr->flags & fPCodeFlag1); instr = instr->nextPCode) appendpcode(blocks2[inputBlockCount - 1], copypcode(instr)); @@ -734,8 +725,7 @@ static void deleteloop(Loop *loop) { while (1) { instr = body->firstPCode; -#line 1294 - CError_ASSERT(instr != NULL); + CError_ASSERT(1294, instr != NULL); if (instr->op == PC_CMP || instr->op == PC_CMPI || instr->op == PC_CMPLI || instr->op == PC_CMPL) break; @@ -978,8 +968,7 @@ static void rewriteunknownloopwithBDNZ(Loop *loop) { while (1) { instr = loop->body->firstPCode; -#line 1857 - CError_ASSERT(instr); + CError_ASSERT(1857, instr); if (instr->op == PC_CMP || instr->op == PC_CMPI || instr->op == PC_CMPLI || instr->op == PC_CMPL) break; @@ -1452,8 +1441,7 @@ void changearraytoregisters(void) { floatCounter -= best->elementCount; } -#line 2394 - CError_ASSERT(intCounter <= 8 && floatCounter <= 8); + CError_ASSERT(2394, intCounter <= 8 && floatCounter <= 8); if (!arrays) return; @@ -1522,8 +1510,7 @@ void changearraytoregisters(void) { newInstr = makepcode(PC_FMR, reg, reg2); break; default: -#line 2494 - CError_FATAL(); + CError_FATAL(2494); break; } |