2022-11-20 05:07:22 +00:00
|
|
|
#ifndef COMPILER_IROUNROLLLOOP_H
|
|
|
|
#define COMPILER_IROUNROLLLOOP_H
|
|
|
|
|
2022-12-14 00:16:59 +00:00
|
|
|
#include "compiler/IrOptimizer.h"
|
2023-01-10 11:05:21 +00:00
|
|
|
#include "compiler/IroLinearForm.h"
|
2022-12-14 00:16:59 +00:00
|
|
|
|
|
|
|
extern void IRO_LoopUnroller(void);
|
2023-01-10 11:05:21 +00:00
|
|
|
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);
|
2022-11-20 05:07:22 +00:00
|
|
|
|
|
|
|
#endif
|