mirror of git://gcc.gnu.org/git/gcc.git
				
				
				
			[Patch 5/7 mips] Deprecate *_BY_PIECES_P, move to hookized version
gcc/ * config/mips/mips.h (MOVE_BY_PIECES_P): Remove. (STORE_BY_PIECES_P): Likewise. * config/mips/mips.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New. (mips_move_by_pieces_p): Rename to... (mips_use_by_pieces_infrastructure_p): ...this, use new hook parameters, use the default hook implementation as a fall-back. From-SVN: r217002
This commit is contained in:
		
							parent
							
								
									ae59bd31fe
								
							
						
					
					
						commit
						a10ce56103
					
				|  | @ -1,3 +1,13 @@ | ||||||
|  | 2014-11-01  James Greenhalgh  <james.greenhalgh@arm.com> | ||||||
|  | 
 | ||||||
|  | 	* config/mips/mips.h (MOVE_BY_PIECES_P): Remove. | ||||||
|  | 	(STORE_BY_PIECES_P): Likewise. | ||||||
|  | 	* config/mips/mips.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New. | ||||||
|  | 	(mips_move_by_pieces_p): Rename to... | ||||||
|  | 	(mips_use_by_pieces_infrastructure_p): ...this, use new hook | ||||||
|  | 	parameters, use the default hook implementation as a | ||||||
|  | 	fall-back. | ||||||
|  | 
 | ||||||
| 2014-11-01  James Greenhalgh  <james.greenhalgh@arm.com> | 2014-11-01  James Greenhalgh  <james.greenhalgh@arm.com> | ||||||
| 
 | 
 | ||||||
| 	* config/sh/sh.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New. | 	* config/sh/sh.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New. | ||||||
|  |  | ||||||
|  | @ -7172,12 +7172,17 @@ mips_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) | ||||||
|   return true; |   return true; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* Implement MOVE_BY_PIECES_P.  */ | /* Implement TARGET_USE_MOVE_BY_PIECES_INFRASTRUCTURE_P.  */ | ||||||
| 
 | 
 | ||||||
| bool | bool | ||||||
| mips_move_by_pieces_p (unsigned HOST_WIDE_INT size, unsigned int align) | mips_use_by_pieces_infrastructure_p (unsigned int size, | ||||||
|  | 				     unsigned int align, | ||||||
|  | 				     enum by_pieces_operation op, | ||||||
|  | 				     bool speed_p) | ||||||
| { | { | ||||||
|   if (HAVE_movmemsi) |   if (op == STORE_BY_PIECES) | ||||||
|  |     return mips_store_by_pieces_p (size, align); | ||||||
|  |   if (op == MOVE_BY_PIECES && HAVE_movmemsi) | ||||||
|     { |     { | ||||||
|       /* movmemsi is meant to generate code that is at least as good as
 |       /* movmemsi is meant to generate code that is at least as good as
 | ||||||
| 	 move_by_pieces.  However, movmemsi effectively uses a by-pieces | 	 move_by_pieces.  However, movmemsi effectively uses a by-pieces | ||||||
|  | @ -7194,13 +7199,12 @@ mips_move_by_pieces_p (unsigned HOST_WIDE_INT size, unsigned int align) | ||||||
| 	return size < UNITS_PER_WORD; | 	return size < UNITS_PER_WORD; | ||||||
|       return size <= MIPS_MAX_MOVE_BYTES_STRAIGHT; |       return size <= MIPS_MAX_MOVE_BYTES_STRAIGHT; | ||||||
|     } |     } | ||||||
|   /* The default value.  If this becomes a target hook, we should
 | 
 | ||||||
|      call the default definition instead.  */ |   return default_use_by_pieces_infrastructure_p (size, align, op, speed_p); | ||||||
|   return (move_by_pieces_ninsns (size, align, MOVE_MAX_PIECES + 1) |  | ||||||
| 	  < (unsigned int) MOVE_RATIO (optimize_insn_for_speed_p ())); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* Implement STORE_BY_PIECES_P.  */ | /* Implement a handler for STORE_BY_PIECES operations
 | ||||||
|  |    for TARGET_USE_MOVE_BY_PIECES_INFRASTRUCTURE_P.  */ | ||||||
| 
 | 
 | ||||||
| bool | bool | ||||||
| mips_store_by_pieces_p (unsigned HOST_WIDE_INT size, unsigned int align) | mips_store_by_pieces_p (unsigned HOST_WIDE_INT size, unsigned int align) | ||||||
|  | @ -19119,6 +19123,10 @@ mips_lra_p (void) | ||||||
| #undef TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS | #undef TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS | ||||||
| #define TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS true | #define TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS true | ||||||
| 
 | 
 | ||||||
|  | #undef TARGET_USE_BY_PIECES_INFRASTRUCTURE_P | ||||||
|  | #define TARGET_USE_BY_PIECES_INFRASTRUCTURE_P \ | ||||||
|  |   mips_use_by_pieces_infrastructure_p | ||||||
|  | 
 | ||||||
| #undef TARGET_SPILL_CLASS | #undef TARGET_SPILL_CLASS | ||||||
| #define TARGET_SPILL_CLASS mips_spill_class | #define TARGET_SPILL_CLASS mips_spill_class | ||||||
| #undef TARGET_LRA_P | #undef TARGET_LRA_P | ||||||
|  |  | ||||||
|  | @ -2872,9 +2872,6 @@ while (0) | ||||||
|    ? MIPS_MAX_MOVE_BYTES_STRAIGHT / MOVE_MAX		\ |    ? MIPS_MAX_MOVE_BYTES_STRAIGHT / MOVE_MAX		\ | ||||||
|    : MIPS_CALL_RATIO / 2) |    : MIPS_CALL_RATIO / 2) | ||||||
| 
 | 
 | ||||||
| #define MOVE_BY_PIECES_P(SIZE, ALIGN) \ |  | ||||||
|   mips_move_by_pieces_p (SIZE, ALIGN) |  | ||||||
| 
 |  | ||||||
| /* For CLEAR_RATIO, when optimizing for size, give a better estimate
 | /* For CLEAR_RATIO, when optimizing for size, give a better estimate
 | ||||||
|    of the length of a memset call, but use the default otherwise.  */ |    of the length of a memset call, but use the default otherwise.  */ | ||||||
| 
 | 
 | ||||||
|  | @ -2887,9 +2884,6 @@ while (0) | ||||||
| 
 | 
 | ||||||
| #define SET_RATIO(speed) \ | #define SET_RATIO(speed) \ | ||||||
|   ((speed) ? 15 : MIPS_CALL_RATIO - 2) |   ((speed) ? 15 : MIPS_CALL_RATIO - 2) | ||||||
| 
 |  | ||||||
| #define STORE_BY_PIECES_P(SIZE, ALIGN) \ |  | ||||||
|   mips_store_by_pieces_p (SIZE, ALIGN) |  | ||||||
|  |  | ||||||
| /* Since the bits of the _init and _fini function is spread across
 | /* Since the bits of the _init and _fini function is spread across
 | ||||||
|    many object files, each potentially with its own GP, we must assume |    many object files, each potentially with its own GP, we must assume | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 James Greenhalgh
						James Greenhalgh