Fwd: Fixed function compilation order

Cupertino Miranda cupertinomiranda@gmail.com
Thu Aug 9 09:23:00 GMT 2007


Here is the answer.

Begin forwarded message:

> From: "Daniel Berlin" <dberlin@dberlin.org>
> Date: August 9, 2007 2:31:08 AM CEDT
> To: "Cupertino Miranda" <cupertinomiranda@gmail.com>
> Subject: Re: Fixed function compilation order
>
> On 8/8/07, Cupertino Miranda <cupertinomiranda@gmail.com> wrote:
>>
>> On Aug 9, 2007, at 2:03 AM, Daniel Berlin wrote:
>>
>>> On 8/8/07, Cupertino Miranda <cupertinomiranda@gmail.com> wrote:
>>>> Hello everyone,
>>>>
>>>> I am currently trying to enable GCC to perform compilation without
>>>> having to respect any compilation order, i.e. execute some pass to
>>>> any function at any time (it is not only pass reordering).
>>>
>>>>
>>>> As what I have seen from (trunk version of) GCC, it doesn't seem an
>>>> easy task to be achieved and it might traduce in many complications
>>>> later in development.
>>>> In that sense I would like to have some opinions and suggestions  
>>>> from
>>>> you all:
>>>
>>>
>>> For tree level optimization, this is really not difficult.
>>> For RTL, this is probably going to be really hard.
>>>>
>>>>   - Imagining I am able to change the function context by updating
>>>> cfun, etc. Will passes (all_passes) execute without
>>>> missing/wrong data, i.e. is all shared data between passes  
>>>> accessed/
>>>> updated thought pointers such as cfun, etc. ?
>>>
>>> What do you mean "missing/wrong" data.
>>
>> Just as an example, imagine you just executed the pass for the
>> creation of the CFG and after that, you decided to change context to
>> another function to perform the same pass.
>
> Let me be clear.  We create CFG/SSA for *all* functions at once right
> now, run a bunch of SSA passes, and then run a bunch of passes
> per-function.  If you try to do something before this happens, yes,
> you will have issues.  The simple answer is "don't do that".
> :)
>
> So basically, you can throw your pass in the list of passes and expect
> changing functions to work like it does in an IPA pass.
>
> The one datastructure you cannot have stored on multiple functions at
> once right now are those related to tree level aliasing.
> We are fixing this, but it is not done yet.



More information about the Gcc mailing list