PATCH: activate thread_jumps for ix86

Jeffrey A Law law@cygnus.com
Tue Oct 17 20:24:00 GMT 2000


  In message <200009222052.NAA21882@kayak.mcgary.org>you write:
  > Bootstraps and compares for ix86.  No testsuite regressions.
  > SPARC tests in progress.
  > 
  > OK? (assuming SPARC is clean)
  > 
  > 2000-09-22  Greg McGary  <greg@mcgary.org>
  > 
  > 	* jump.c (explode_condition): New function.
  > 	(thread_jumps): Call explode_condition.
Mostly OK.  But I think we've got at least one potential problem in
explode_condition:


  > +      for (prev = prev_nonnote_insn (insn);
  > +	   prev && GET_CODE (prev) != CODE_LABEL;
  > +	   prev = prev_nonnote_insn (prev))
  > +	if ((set = single_set (prev)) != 0
  > +	    && rtx_equal_p (SET_DEST (set), op0)
  > +	    && GET_CODE (SET_SRC (set)) == COMPARE)
  > +	  {
  > +	    op0 = XEXP (SET_SRC (set), 0);
  > +	    op1 = XEXP (SET_SRC (set), 1);
  > +	    insn = prev;
  > +	    break;
  > +	  }
  > +    }
It seems to me this loop is far too simplistic.

For example, op0 may not be set in the current block, it's possible it was
set in an earlier block.  Or op0 may have been set inside a PARALLEL which
wouldn't be a single set, etc.

I'd like to see that loop beefed up a little to handle some of the less
obvious cases.  That probably means that we change the loop to iterate
if and only if we can fully analyze PREV and determine that it has no
effect on op0.

jeff



More information about the Gcc-patches mailing list