Fix register dependency update in multi block loop optimization
This commit is contained in:
parent
bf89d7af33
commit
4068957442
|
@ -21352,7 +21352,7 @@ bool NativeCodeBasicBlock::LoopRegisterXYMap(void)
|
||||||
{
|
{
|
||||||
pblock = mProc->AllocateBlock();
|
pblock = mProc->AllocateBlock();
|
||||||
pblock->mEntryRequiredRegs = mEntryRequiredRegs;
|
pblock->mEntryRequiredRegs = mEntryRequiredRegs;
|
||||||
pblock->mExitRequiredRegs = mExitRequiredRegs;
|
pblock->mExitRequiredRegs = mEntryRequiredRegs;
|
||||||
pblock->Close(pblocks[0]->mBranchIns, this, nullptr, ASMIT_JMP);
|
pblock->Close(pblocks[0]->mBranchIns, this, nullptr, ASMIT_JMP);
|
||||||
AddEntryBlock(pblock);
|
AddEntryBlock(pblock);
|
||||||
for (int i = 0; i < pblocks.Size(); i++)
|
for (int i = 0; i < pblocks.Size(); i++)
|
||||||
|
@ -34761,7 +34761,7 @@ bool NativeCodeBasicBlock::OptimizeSingleEntryLoop(NativeCodeProcedure* proc)
|
||||||
{
|
{
|
||||||
pblock = mProc->AllocateBlock();
|
pblock = mProc->AllocateBlock();
|
||||||
pblock->mEntryRequiredRegs = mEntryRequiredRegs;
|
pblock->mEntryRequiredRegs = mEntryRequiredRegs;
|
||||||
pblock->mExitRequiredRegs = mExitRequiredRegs;
|
pblock->mExitRequiredRegs = mEntryRequiredRegs;
|
||||||
pblock->Close(pblocks[0]->mBranchIns, this, nullptr, ASMIT_JMP);
|
pblock->Close(pblocks[0]->mBranchIns, this, nullptr, ASMIT_JMP);
|
||||||
AddEntryBlock(pblock);
|
AddEntryBlock(pblock);
|
||||||
for (int i = 0; i < pblocks.Size(); i++)
|
for (int i = 0; i < pblocks.Size(); i++)
|
||||||
|
@ -49225,7 +49225,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc)
|
||||||
mInterProc = proc;
|
mInterProc = proc;
|
||||||
mInterProc->mLinkerObject->mNativeProc = this;
|
mInterProc->mLinkerObject->mNativeProc = this;
|
||||||
|
|
||||||
CheckFunc = !strcmp(mInterProc->mIdent->mString, "vspr_sort");
|
CheckFunc = !strcmp(mInterProc->mIdent->mString, "enemies_check");
|
||||||
|
|
||||||
int nblocks = proc->mBlocks.Size();
|
int nblocks = proc->mBlocks.Size();
|
||||||
tblocks = new NativeCodeBasicBlock * [nblocks];
|
tblocks = new NativeCodeBasicBlock * [nblocks];
|
||||||
|
@ -50655,6 +50655,7 @@ void NativeCodeProcedure::Optimize(void)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
ResetVisited();
|
ResetVisited();
|
||||||
mEntryBlock->CheckAsmCode();
|
mEntryBlock->CheckAsmCode();
|
||||||
|
|
Loading…
Reference in New Issue