This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What to remove after tree-ssa is merged?


On Wednesday 04 February 2004 6:46 pm, Richard Kenner wrote:
>     e.g. in previously mentioned examples a COMPONENT_REF where the actual
>     offset depends on the size of an array which depends on the value of a
>     variable.
>
> No, that's not correct.  It doesn't depend on the value of a
> *variable* but on a value within the instance of the type.  There is
> nothing to make it explicit *into* since the intent of the node is
> that the value is to be obtained individually and at run-time from
> each instance of an object of that type.

I'd include "value within the instance of the type" in the definition of 
"variable".

It _can_ be made explicit. We may not know the actual value, but for a given 
expression we do know which instance we want to extract it from (by walking 
back to a corresponding WITH_RECORD_EXPR). Depending on the method used some 
high level type information may be lost.

In this and previous threads several methods of doing this have been 
suggested. These range from decomposing effected COMPONENT_REFs into pointer 
arithmetic to creating a new subtype for each expression used in a 
WITH_RECORD_EXPR.

I'm not saying lowering in the frontend is the best solution, but it is 
certainly an option. Based on your previous messages I don't believe you know 
enough of the workings of the tree-ssa optimizers to be able to estimate the 
work involved adding WITH_RECORD_EXPR.

I certainly don't claim to be able to make that judgement.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]