oridb/mc

Basic dead code elimination should apply to reachability computation.

oridb opened this issue · 0 comments

oridb commented

Right now, things like:

const f = {
     while true
           if do_thing
               -> 123
           ;;
      ;;
}

will complain because there's no return after while true. Trivially untaken branches (when the loop condition is a simply computed compile time constant) should be eliminated when determining use before def or reaching the end of the function without a return.