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] Do not set BB_SUPERBLOCK in loop-unroll.c:split_edge_and_insert


Hello,

> This patch is a follow-up to a call-for-help I sent out last week:
> http://gcc.gnu.org/ml/gcc/2007-02/msg00379.html
> 
> Further testing still doesn't show any breakage.  Also, it turns out that
> loop-unswitch.c also uses compare_and_jump_seq(), without considering the
> possibility that compare_and_jump_seq may produce insn chains with more
> than one jump.  Apparently the BB_SUPERBLOCK trick in loop-unroll.c is
> there to handle that possibility, but if loop-unswitch doesn't have to do
> this, then I'm guessing that loop-unroll also doesn't need it.
> 
> So I'd like to just remove it, and replace it with a sanity check.
> 
> The worst thing that could happen with the attached patch is more test
> suite failures iff something is broken by this change.  I will revert the
> patch and figure out a fix in case something does break.
> 
> Bootstrapped&tested on {i686,x86_64,ia64}-unknown-linux-gnu, plus the
> testing mentioned in the replies to my cfg (including bootstrap on alpha
> with loop unrolling enabled).
> OK for the trunk?

I do not dare to approve this; introducing code that relies on
"blackbox" understanding of what some functions do seems a bit dangerous
to me.

Although it may be quite difficult, I think that the only clean way is
to find out why force_operand/compare_and_jump_seq do not emit control
flow insns when they are used as in loop-unroll.c, and base a solution
on this (which may turn out to be just extending the patch below by
documenting in which cases these functions are guaranteed not to
introduce control flow insns).

Zdenek


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