[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimizations (was Re: [DotGNU]All my tests work)

From: Gopal V
Subject: Re: Optimizations (was Re: [DotGNU]All my tests work)
Date: Wed, 20 Nov 2002 22:30:46 +0530
User-agent: Mutt/1.2.5i

If memory serves me right, Rhys Weatherley wrote:
> > Hmm... I would rather do it in ? ... Calling EvalConst on the
> > codegen seems ugly to me .... Considering the fact that we already do a
> > constant folding (ILEvalOperator) step in the SemAnalysis ?..
> If it is done in codegen, then the C compiler will also get the
> optimizations for free, but if it is done during semantic analysis,
> then it will need to be replicated for each language.

hhmmm... but well we need to control  .... ah whatever ... I'll just replant
my code to codegen ... And trim it a bit to avoid stuff I put in to ensure
that the correct type is shifted ..

> > with var in lvalue and out or ref parameters seem the only variant cases ,
> > and the second could use ILNode_Identifier's semanalysis ?).
> Yes, they are similar, with a bit more house-keeping required.

I tried something using a node->optimizationContext as a tree to store 
info about the variables using a  (like 0 for undef, 1 for assigned in block
, 2 for used block....). Seems quite straight forward to do an 
ILNode_FlowAnalysis ...

Also this would mean that we could improve on our dead-code removal using
the variable "assigned vs used" stuff for localvars ... (viz void funcs
with no external calls will be 0 sized ?)..

> This weekend perhaps, if everyone is happy with the state of their
> code at the end of the week.

Ok ...

The difference between insanity and genius is measured by success

reply via email to

[Prev in Thread] Current Thread [Next in Thread]