This is the mail archive of the gcc-patches@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: PATCH: Properly check the end of basic block


On Tue, Nov 23, 2010 at 11:11 AM, Richard Sandiford
<rdsandiford@googlemail.com> wrote:
> Steven Bosscher <stevenb.gcc@gmail.com> writes:
>>> Index: passes.c
>>> ===================================================================
>>> --- passes.c (revision 166920)
>>> +++ passes.c (working copy)
>>> @@ -1051,8 +1051,8 @@ init_optimization_passes (void)
>>> ? ? ? ?NEXT_PASS (pass_compute_alignments);
>>> ? ? ? ?NEXT_PASS (pass_duplicate_computed_gotos);
>>> ? ? ? ?NEXT_PASS (pass_variable_tracking);
>>> - ? ? ?NEXT_PASS (pass_free_cfg);
>>> ? ? ? ?NEXT_PASS (pass_machine_reorg);
>>> + ? ? ?NEXT_PASS (pass_free_cfg);
>>> ? ? ? ?NEXT_PASS (pass_cleanup_barriers);
>>> ? ? ? ?NEXT_PASS (pass_delay_slots);
>>> ? ? ? ?NEXT_PASS (pass_split_for_shorten_branches);
>>
>> This breaks at least all targets that run delay slot scheduling during
>> machine-reorg (MIPS), targets that layout constant pools (SH,ARM),
>> targets that recompute the CFG in their machine-reorg (blackfin, ia64,
>> MIPS (?!)).
>
> Just out of curiosity, why the (?!) ? ?We need dataflow info when
> working around an r10k speculative execution errata and when relaxing
> PIC calls. ?We free it again before doing DBR, like you say.

The (?!) because it's just funny that on the one hand MIPS
re-calculates the CFG for some subtargets, but cannot work if the CFG
is not released before machine_reorg for some other subtargets. This
means that just putting pass_free_cfg after machine_reorg in passes.c
is impossible (MIPS will break, and recalculating the CFG after
dbr_sched is also impossible) but free-ing the CFG before
machine_reorg (like it is now) causes extra work for MIPS.  Kind-of
schizofrenic port :-)

Ciao!
Steven


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