Skip to content

Commit e4fa38d

Browse files
author
Meghana Gupta
committed
[MERGE #5343 @meg-gupta] Revert "Enable deadstore for jit loop bodies when there is try"
Merge pull request #5343 from meg-gupta:revertdeadstore This reverts commit 1a9529a. In SimpleJit there is no accurate from try block to finally block, which can cause incorrect deadstores.
2 parents 3181c96 + a857c69 commit e4fa38d

File tree

3 files changed

+5
-41
lines changed

3 files changed

+5
-41
lines changed

lib/Backend/BackwardPass.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ BackwardPass::DoMarkTempObjectVerify() const
107107
bool
108108
BackwardPass::DoDeadStore(Func* func)
109109
{
110-
return !PHASE_OFF(Js::DeadStorePhase, func);
110+
return
111+
!PHASE_OFF(Js::DeadStorePhase, func) &&
112+
(!func->HasTry() || func->DoOptimizeTry());
111113
}
112114

113115
bool
@@ -122,7 +124,8 @@ bool
122124
BackwardPass::DoDeadStoreSlots() const
123125
{
124126
// only dead store fields if glob opt is on to generate the trackable fields bitvector
125-
return (tag == Js::DeadStorePhase && this->func->DoGlobOpt());
127+
return (tag == Js::DeadStorePhase && this->func->DoGlobOpt()
128+
&& (!this->func->HasTry()));
126129
}
127130

128131
// Whether dead store is enabled for given func and sym.

test/EH/rlexe.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,4 @@
204204
<files>tfjitloopbug.js</files>
205205
</default>
206206
</test>
207-
<test>
208-
<default>
209-
<files>tcdeadstorebug.js</files>
210-
<compile-flags> -maxinterpretcount:1 -maxsimplejitruncount:1 -MinMemOpCount:0 -werexceptionsupport -bgjit- -loopinterpretcount:1</compile-flags>
211-
<tags>exclude_dynapogo</tags>
212-
</default>
213-
</test>
214207
</regress-exe>

test/EH/tcdeadstorebug.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)