Skip to content
  • Michal Terepeta's avatar
    Fix dead code elimination used in tests · 782ffec3
    Michal Terepeta authored
    The helper functions to fold over instructions and expressions in
    test/OptSupport have a bug where they would not recurse for complex
    expressions. And since testing/Live module depends on it, complex
    expressions would not be fully analyzed, leading to removal of code
    that is *not* dead, e.g.,
      var1 = m[0]
      var1 = m[var1] + m[var1]
    would get rewritten to just
      var1 = m[var1] + m[var1]
    which is clearly wrong.
    
    Note that this bug affects only Hoopl's tests.
    782ffec3