[m-dev.] diff for review

Fergus Henderson fjh at cs.mu.oz.au
Wed Apr 23 12:05:02 AEST 1997


Simon TAYLOR, you wrote:
> 
> Hi Fergus,
> 
> > > 	Fix a code generator abort for if-then-elses with conditions
> > > 	that cannot succeed by fixing and enabling the code to optimise
> > > 	away such cases.
> > 
> > Why did the code generator abort for such conditions?
> 
> The condition of the if-then-else always failed, so the instmap after the
> condition was not_reached. The code generator didn't produce any code for
> the then part, but then attempted to produce the variables that the then
> part should have created when generating the branch end. 
> 
> > Fixing things only in simplify.m means that every optimization that
> > transforms the code needs to be careful to not introduce such constructs. 
> 
> Simplify is run just before code generation to remove constructs that the
> code generator can't handle. 

Ah, you're right.  In that case, I suppose it doesn't really matter much
whether things are fixed in the code generator or in simplify.m.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list