[m-dev.] for review: rewrite of duplicate elimination.

Zoltan Somogyi zs at cs.mu.oz.au
Wed Dec 24 16:12:13 AEDT 1997


Tyson wrote:
> There is no need for such a test case to detect that *something* has
> gone wrong. The test is very handy for testing whether the something
> that has gone wrong is that a particular LLDS-to-LLDS transformation no
> longer works (although it's a one way test). 

It is often impossible to come up with test cases that test *specifically*
for the correctness of a particular optimization. The problem is that in most
cases, the code sequence that is input to one optimization is produced by
another optimization. If this earlier optimization is switched off,
the later optimization may not trigger and thus the test case may succeed
even if the later optimization has become incorrect. If the earlier
optimization is switched on, its incorrectness can also cause the failure
of the test case.

With HLDS-to-HLDS optimizations, you can always write by hand the code that
you want as the input to the optimization, and then switch off all other
HLDS-to-HLDS optimizations. With LLDS-to-LLDS optimizations this is not
possible.

Zoltan.



More information about the developers mailing list