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: Don't create pseudos after no_new_pseudos on SH


Daniel Jacobowitz wrote:
> 
> On Mon, Nov 18, 2002 at 08:51:30PM +0000, Joern Rennecke wrote:
> > It is not good practice to unnecessarily duplicate the test in
> > zero_extendqisi2 in gen_shl_and .  Rather, zero_extendqisi2 and
> > zero_extendhisi2 should FAIL; when they would need a new pseudo
> > but can't have one, and this could be tested in gen_shl_and.
> 
> I didn't realize I could FAIL at that point.  Thanks, I knew there had
> to be a better way.

Note that the rules are different for different patterns and different
callers.  Move patterns should never FAIL when called by
machine-independent code.  There are a number of named patterns that
should not fail when called during initial rtl generation, while others
may FAIL whenever they see fit.
If a condition can only arise when some backend code invokes the pattern,
you can code the handling of the FAIL in the caller when you put it into
the callee pattern. 

> I'm not sure what you're talking about; what's "ashrdi3+3" refer to?
> None of the ashrdi3* patterns are called at all in my testcase.

When a pattern has no name, it can be referred to by the previous named
pattern and an offset that indicates how many patterns further down
the md file the referred to pattern is.  I.e. ashrdi3+1 is the pattern
just after ashrdi3.  This is also the notation used by the generater
programs when they report error messages.

FWIW, I whish there was a way to give all patterns - including splitters -
a name, so that we could do away with this fragile naming (these designations
shift in meaning when you insert new patterns).
	
-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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