Re: PRE and CISC



On Jan 18, 5:22 am, shrey <shreya...@xxxxxxxxx> wrote:
Two questions if somebody can help me find answers:
1. Are there any PRE algorithms that are aware of such addressing
modes ?

In practice you have to use huristics to decide when any optimization
is worthwhile. In the case of PRE you run the first half of the
algorithm to identify the partially redundant expressions then only do
the transformation if the expressions are more compilcated than the
addressing modes supported on your machine.

2. if not, how else can the subsequent passes recover so that they can
use these addressing modes?

One example is rematerialization, which replaces register spill code
with code to recompute the value at its use.
.