MLton 20051202 RedundantTests
Home  Index  
RedundantTests is an optimization pass for the SSA IntermediateLanguage, invoked from SSASimplify.

Description

This pass simplifies conditionals whose results are implied by a previous conditional test.

Implementation

[WWW]redundant-tests.sig [WWW]redundant-tests.fun

Details and Notes

An additional test will sometimes eliminate the overflow test when adding or subtracting 1. In particular, it will eliminate it in the following cases:

if x < y
  then ... x + 1 ...
else ... y - 1 ...


Last edited on 2005-12-02 00:59:16 by StephenWeeks.