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] Fix ICE with -fno-if-conversion (PR rtl-optimization/68730)


On 12/10/2015 01:11 PM, Jakub Jelinek wrote:
Hi!

It seems some passes in between the combiner and ira aren't prepared to
update dominance info.  It usually is not a problem, because already before
the combiner we call free_dominance_info.  But we now have a new i?86
stv pass that is injected after the combiner that computes dominators but
does not free them.

So, to fix ICE on the following testcase, we can either do what the patch
does, or could conditionalize both the calculate_dominance_info and
free_dominance_info in the convert_scalars_to_vector function (stv pass)
on the dominance info not being computed (like other places in gcc do),
or we could stick free_dominance_info into all passes that break the
dominators just in case it would be computed (out_of_cfglayout is one
example).

Bootstrapped/regtested on x86_64-linux and i686-linux, is this ok for trunk
(or some other variant is preferrable)?

2015-12-10  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/68730
	* config/i386/i386.c (convert_scalars_to_vector): Call
	free_dominance_info at the end.

	* gcc.dg/pr68730.c: New test.
Any pass that mucks up the dominator tree ought to be wiping it clean. It's obviously better if wiping the dominator tree is conditional on the pass actually making transformations to the CFG that invalidate the stored information.

Similarly, any pass that needs the dominator tree ought to make sure it's around. Note this is cheap if the prior pass hasn't wiped the dominator tree.

At least that's always been my understanding.

So ISTM this patch is the right thing to do in and of itself, though it may not be complete as there may be passes that aren't following the rules noted above.


jeff


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