RedundantTests - MLton Standard ML Compiler (SML Compiler)

MLton MLTONWIKIVERSION | 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

redundant-tests.sig 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 2006-11-02 17:37:46 by MatthewFluet.