Fix complex loop intercode index reversal
This commit is contained in:
parent
ccf13c78f0
commit
d3734a66e0
|
@ -14333,6 +14333,12 @@ bool InterCodeBasicBlock::SingleTailLoopOptimization(const NumberSet& aliasedPar
|
||||||
mins->mDst.mRange.SetLimit(num, num);
|
mins->mDst.mRange.SetLimit(num, num);
|
||||||
mLoopPrefix->mInstructions.Insert(mLoopPrefix->mInstructions.Size() - 1, mins);
|
mLoopPrefix->mInstructions.Insert(mLoopPrefix->mInstructions.Size() - 1, mins);
|
||||||
|
|
||||||
|
for (int k = 0; k < body.Size(); k++)
|
||||||
|
{
|
||||||
|
if (body[k]->mEntryValueRange.Size())
|
||||||
|
body[k]->mEntryValueRange[ai->mSrc[1].mTemp].SetLimit(1, num);
|
||||||
|
}
|
||||||
|
|
||||||
if (mEntryValueRange.Size())
|
if (mEntryValueRange.Size())
|
||||||
mEntryValueRange[ai->mSrc[1].mTemp].SetLimit(1, num);
|
mEntryValueRange[ai->mSrc[1].mTemp].SetLimit(1, num);
|
||||||
|
|
||||||
|
@ -20679,7 +20685,7 @@ void InterCodeProcedure::Close(void)
|
||||||
{
|
{
|
||||||
GrowingTypeArray tstack(IT_NONE);
|
GrowingTypeArray tstack(IT_NONE);
|
||||||
|
|
||||||
CheckFunc = !strcmp(mIdent->mString, "main");
|
CheckFunc = !strcmp(mIdent->mString, "RenderLogo");
|
||||||
CheckCase = false;
|
CheckCase = false;
|
||||||
|
|
||||||
mEntryBlock = mBlocks[0];
|
mEntryBlock = mBlocks[0];
|
||||||
|
@ -21399,8 +21405,6 @@ void InterCodeProcedure::Close(void)
|
||||||
|
|
||||||
BuildDataFlowSets();
|
BuildDataFlowSets();
|
||||||
|
|
||||||
CheckCase = true;
|
|
||||||
|
|
||||||
ResetVisited();
|
ResetVisited();
|
||||||
mEntryBlock->SingleBlockLoopOptimisation(mParamAliasedSet, mModule->mGlobalVars);
|
mEntryBlock->SingleBlockLoopOptimisation(mParamAliasedSet, mModule->mGlobalVars);
|
||||||
|
|
||||||
|
@ -21480,9 +21484,6 @@ void InterCodeProcedure::Close(void)
|
||||||
|
|
||||||
DisassembleDebug("Peephole Temp Check");
|
DisassembleDebug("Peephole Temp Check");
|
||||||
|
|
||||||
if (i == 1)
|
|
||||||
CheckCase = true;
|
|
||||||
|
|
||||||
RemoveUnusedInstructions();
|
RemoveUnusedInstructions();
|
||||||
|
|
||||||
ReduceTemporaries();
|
ReduceTemporaries();
|
||||||
|
|
Loading…
Reference in New Issue