This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Generate annotations for a binary translator
- From: Ian Lance Taylor <iant at google dot com>
- To: ééä <chenwj at iis dot sinica dot edu dot tw>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 09 Jun 2011 06:13:29 -0700
- Subject: Re: Generate annotations for a binary translator
- References: <mcr7h9va1ta.fsf@coign.corp.google.com> <20110513033505.GA79308@cs.nctu.edu.tw> <mcrtycz8aaa.fsf@coign.corp.google.com> <20110516085156.GA67683@cs.nctu.edu.tw> <mcrei3y4cmh.fsf@coign.corp.google.com> <20110517053946.GA99002@cs.nctu.edu.tw> <mcrzkmlzur7.fsf@coign.corp.google.com> <20110517090528.GA56624@cs.nctu.edu.tw> <20110609053825.GA68628@cs.nctu.edu.tw> <mcr8vtb7bn1.fsf@coign.corp.google.com> <20110609070510.GA70020@cs.nctu.edu.tw>
ééä <chenwj@iis.sinica.edu.tw> writes:
>> That documentation is out of date. The CFG is now retained through most
>> of the RTL passes.
>
> You said "through most of the RTLpasses". And I found the CFG
> is freed before other passes in gcc/passes.c.
>
> NEXT_PASS (pass_free_cfg);
> NEXT_PASS (pass_machine_reorg);
> NEXT_PASS (pass_cleanup_barriers);
> NEXT_PASS (pass_delay_slots);
> NEXT_PASS (pass_split_for_shorten_branches);
> NEXT_PASS (pass_convert_to_eh_region_ranges);
> NEXT_PASS (pass_shorten_branches);
> NEXT_PASS (pass_set_nothrow_function_flags);
> NEXT_PASS (pass_final);
>
> Is the CFG the same as the one in the assembly? I mean
> if I analysis the assembly and contruct the CFG back, they
> are the same?
The machine reorg pass in particular can change anything, and may change
the CFG. The delay slots pass may also change the CFG. It depends on
your particular target.
Ian