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]

Re: SH: missing end of basic blocks


Jan Hubicka <jh@suse.cz> wrote:
>> Sometimes the end of basic block is represented by call insn
>> and barrier in c++ compiler for SH. I've met it in compiling
>> c++locale.cc when building libstdc++.
>> The attached patch treats it in find_sub_basic_blocks().
>> Bootstrapped and regression tested on i686-linux and sh-linux.
> This looks strange to me.  The barrier should not happen after CALL_INSN,
> unless it is sibbling or noreturn call (noreturn call is makred by
> REG_NORETURN, while sibbling call by "/j" in the dump).
> 
> So in case you are seeing one of these, you should rather test for these
> properties instead of leading barriers (in longer run I would like to kill
> barriers entirely).
>
> In any case, find_sub_basic_block is used to fixup flowgraph after insn
> splitting.  I don't think insn splitters emit call insns on the SH, so
> this case should not happen - it means that the CFG is already out of date
> earlier.

Insn splitters will emit call insns on the SH in PIC case. There
are define_insn_and_split for pc-relative calls.

> When exactly are you seeing the problem?

This CALL_INSN + BARRIER case occurs at

c++locale.cc:void std::moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(int*) [with _CharT = char, bool _Intl = false])

for example. There are 893 such cases in building libstdc++-v3 and
more such cases in building libjava.

	kaz



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