Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-05 Thread Jeff Law
On 03/05/15 01:47, Richard Biener wrote: On Thu, Mar 5, 2015 at 1:54 AM, Jan Hubicka wrote: It gets passed the valueize callback now which returns NULL_TREE for SSA names we can't follow. Btw, for match-and-simplify I had to use that as default for fold_stmt _exactly_ because of the call to

Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-05 Thread Richard Biener
On Thu, Mar 5, 2015 at 1:54 AM, Jan Hubicka wrote: >> > >> > It gets passed the valueize callback now which returns NULL_TREE for >> > SSA names we can't follow. >> >> Btw, for match-and-simplify I had to use that as default for fold_stmt >> _exactly_ because of the call to fold_stmt from replace_

Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-04 Thread Jan Hubicka
> > > > It gets passed the valueize callback now which returns NULL_TREE for > > SSA names we can't follow. > > Btw, for match-and-simplify I had to use that as default for fold_stmt > _exactly_ because of the call to fold_stmt from replace_uses_by > via merge-blocks from cfgcleanup. This is beca

Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-04 Thread Jan Hubicka
> > I'd say that the devirtualization code is quite a heavy thing do to from > fold_stmt. Yes - it want's to catch all cases if a stmt is modified > (after which passes should fold it). Yep, I have no prolem doing the heavy part just at a specified point. (it usually converges quickly, but there

Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-04 Thread Richard Biener
On Wed, Mar 4, 2015 at 1:41 PM, Richard Biener wrote: > On Wed, Mar 4, 2015 at 6:27 AM, Jeff Law wrote: >> On 03/02/15 01:38, Richard Biener wrote: >>> >>> On Mon, Mar 2, 2015 at 6:34 AM, Aldy Hernandez wrote: As I mention in the PR... What's happening here is that the ipa_po

Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-04 Thread Richard Biener
On Wed, Mar 4, 2015 at 6:27 AM, Jeff Law wrote: > On 03/02/15 01:38, Richard Biener wrote: >> >> On Mon, Mar 2, 2015 at 6:34 AM, Aldy Hernandez wrote: >>> >>> As I mention in the PR... >>> >>> What's happening here is that the ipa_polymorphic_call_context >>> constructor >>> is calling walk_ssa_c

Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-03 Thread Jeff Law
On 03/02/15 01:38, Richard Biener wrote: On Mon, Mar 2, 2015 at 6:34 AM, Aldy Hernandez wrote: As I mention in the PR... What's happening here is that the ipa_polymorphic_call_context constructor is calling walk_ssa_copies on a PHI node that has no arguments. This happens because finalize_jum

Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-03 Thread Jan Hubicka
> On Mon, Mar 2, 2015 at 6:34 AM, Aldy Hernandez wrote: > > As I mention in the PR... > > > > What's happening here is that the ipa_polymorphic_call_context constructor > > is calling walk_ssa_copies on a PHI node that has no arguments. This > > happens because finalize_jump_threads eventually re

Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-02 Thread Richard Biener
On Mon, Mar 2, 2015 at 6:34 AM, Aldy Hernandez wrote: > As I mention in the PR... > > What's happening here is that the ipa_polymorphic_call_context constructor > is calling walk_ssa_copies on a PHI node that has no arguments. This > happens because finalize_jump_threads eventually removes some P

[patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-01 Thread Aldy Hernandez
As I mention in the PR... What's happening here is that the ipa_polymorphic_call_context constructor is calling walk_ssa_copies on a PHI node that has no arguments. This happens because finalize_jump_threads eventually removes some PHI arguments as it's redirecting some edges, leaving a PHI