Browse Source

Revert "Enable deadstore for jit loop bodies when there is try"

This reverts commit 1a9529a21e1d2aa0e95489c9ffaa1a6dce1050f7.
Meghana Gupta 7 years ago
parent
commit
a857c69acf
3 changed files with 5 additions and 41 deletions
  1. 5 2
      lib/Backend/BackwardPass.cpp
  2. 0 7
      test/EH/rlexe.xml
  3. 0 32
      test/EH/tcdeadstorebug.js

+ 5 - 2
lib/Backend/BackwardPass.cpp

@@ -107,7 +107,9 @@ BackwardPass::DoMarkTempObjectVerify() const
 bool
 BackwardPass::DoDeadStore(Func* func)
 {
-    return !PHASE_OFF(Js::DeadStorePhase, func);
+    return
+        !PHASE_OFF(Js::DeadStorePhase, func) &&
+        (!func->HasTry() || func->DoOptimizeTry());
 }
 
 bool
@@ -122,7 +124,8 @@ bool
 BackwardPass::DoDeadStoreSlots() const
 {
     // only dead store fields if glob opt is on to generate the trackable fields bitvector
-    return (tag == Js::DeadStorePhase && this->func->DoGlobOpt());
+    return (tag == Js::DeadStorePhase && this->func->DoGlobOpt()
+        && (!this->func->HasTry()));
 }
 
 // Whether dead store is enabled for given func and sym.

+ 0 - 7
test/EH/rlexe.xml

@@ -204,11 +204,4 @@
        <files>tfjitloopbug.js</files>
   </default>
   </test>
-  <test>
-    <default>
-      <files>tcdeadstorebug.js</files>
-      <compile-flags> -maxinterpretcount:1 -maxsimplejitruncount:1 -MinMemOpCount:0 -werexceptionsupport  -bgjit- -loopinterpretcount:1</compile-flags>
-      <tags>exclude_dynapogo</tags>
-    </default>
-  </test>
 </regress-exe>

+ 0 - 32
test/EH/tcdeadstorebug.js

@@ -1,32 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-function test0() {
-  var i32 = new Int32Array(1);
-  {
-    class class0 {
-    }
-    class class8 {
-    }
-    class class17 {
-      static func91(argMath135) {
-        if (new class0() * h) {
-        } 
-      }
-      static func94() {
-        return class8.func78;
-      }
-    }
-    for (var _strvar2 in i32) {
-      continue;	    
-      try {
-      } catch (ex) {
-        class8;
-      }
-    }
-  }
-}
-test0();
-test0();
-print("Passed");