summaryrefslogtreecommitdiff
path: root/includes/compiler/IroUnrollLoop.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-10 11:05:21 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-10 11:05:21 +0000
commitaec1b8dddc68ecb8288ec6132932e4c7b4bca09f (patch)
tree8138328fe43bcc5fff690dc60caac79aa570ab2b /includes/compiler/IroUnrollLoop.h
parentfcfbafff31869ed808bff0639532db1828660e92 (diff)
downloadMWCC-aec1b8dddc68ecb8288ec6132932e4c7b4bca09f.tar.gz
MWCC-aec1b8dddc68ecb8288ec6132932e4c7b4bca09f.zip
getting close to done
Diffstat (limited to 'includes/compiler/IroUnrollLoop.h')
-rw-r--r--includes/compiler/IroUnrollLoop.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/includes/compiler/IroUnrollLoop.h b/includes/compiler/IroUnrollLoop.h
index 9e08d03..8a51a9b 100644
--- a/includes/compiler/IroUnrollLoop.h
+++ b/includes/compiler/IroUnrollLoop.h
@@ -2,21 +2,22 @@
#define COMPILER_IROUNROLLLOOP_H
#include "compiler/IrOptimizer.h"
+#include "compiler/IroLinearForm.h"
extern void IRO_LoopUnroller(void);
-extern void IRO_IterateForLoopBody();
-extern void IRO_LinearizeForLoopPostLoop();
-extern void BuildEarlyLoopExitTest();
-extern void BuildLoopExitTest();
-extern void IsIterationCountConstant();
-extern void NoOpBlock();
-extern void IRO_TestConstantIterationCount();
-extern void BuildOrigIterationCount();
-extern void BuildNewFinalvalue();
-extern void BuildUnrolledBodyEntryTest();
-extern void ChangeInductionReference();
-extern void UpdateInductionIncrement();
-extern void GenInitialAssignment();
-extern void GenNewInduction();
+extern void IRO_IterateForLoopBody(IRONode *start, IRONode *end, IROLoop *loop, IROLinear *destnode, SInt32 addConst, CInt64 *val, Boolean funkyFlag);
+extern void IRO_LinearizeForLoopPostLoop(IRONode *fnode1, IRONode *fnode2, IROLoop *loop, IRONode *fnode3, UInt32 unrollFactor);
+extern IROLinear *BuildEarlyLoopExitTest(IROLinearType type, IROList *list);
+extern IROLinear *BuildLoopExitTest(IROLinearType type, IROList *list);
+extern int IsIterationCountConstant(IROLoop *loop, CInt64 *pval);
+extern void NoOpBlock(IRONode *fnode);
+extern void IRO_TestConstantIterationCount(IROLoop *loop, CInt64 *iterCount, SInt32 vectorStride, UInt32 *unrollFactor, SInt32 *leftOver, UInt32 *needOrigLoop, UInt32 *needUnrollBodyTest, UInt32 *resetUnrolledFinalValue);
+extern IROLinear *BuildOrigIterationCount(IROList *list, IROLoop *loop);
+extern IROLinear *BuildNewFinalvalue(IROLinear *iterCount, UInt32 unrollFactor, IROList *list, IROLoop *loop);
+extern void BuildUnrolledBodyEntryTest(IROList *list, IROLinear *iterCount, UInt32 unrollFactor, CLabel *label);
+extern void ChangeInductionReference(IROLinear *first, IROLinear *last, CInt64 val, IROLoop *loop);
+extern IROLinear *UpdateInductionIncrement(IROLoop *loop, SInt32 value, IROLinear *before);
+extern void GenInitialAssignment(IROLoop *loop, Object *var, IROList *list);
+extern void GenNewInduction(void);
#endif