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]

another cute little dfa, for v850 this time


Hi,

And another user of define_function_unit gone.
(yes i'm working on a few non-trivial ones too ;-)
Created a i686 X v850-unknown-linux and verified
that the resulting asm is not significantly changed.
OK for mainline?

Gr.
Steven



	* config/v850/v850.c (v850_use_dfa_pipeline_interface): New.
	* config/v850/v850.md: Convert to DFA scheduler description.

Index: config/v850/v850.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/v850/v850.c,v
retrieving revision 1.88
diff -c -3 -p -r1.88 v850.c
*** config/v850/v850.c	13 May 2004 06:40:08 -0000	1.88
--- config/v850/v850.c	5 Jun 2004 11:40:43 -0000
*************** static void v850_insert_attributes   (tr
*** 64,69 ****
--- 64,70 ----
  static void v850_select_section (tree, int, unsigned HOST_WIDE_INT);
  static void v850_encode_data_area    (tree, rtx);
  static void v850_encode_section_info (tree, rtx, int);
+ static int  v850_use_dfa_pipeline_interface (void);
  static bool v850_return_in_memory    (tree, tree);
  static void v850_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
  					 tree, int *, int);
*************** static int v850_interrupt_p = FALSE;
*** 113,121 ****
--- 114,126 ----
  
  #undef TARGET_RTX_COSTS
  #define TARGET_RTX_COSTS v850_rtx_costs
+ 
  #undef TARGET_ADDRESS_COST
  #define TARGET_ADDRESS_COST hook_int_rtx_0
  
+ #undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
+ #define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE v850_use_dfa_pipeline_interface
+ 
  #undef TARGET_MACHINE_DEPENDENT_REORG
  #define TARGET_MACHINE_DEPENDENT_REORG v850_reorg
  
*************** v850_encode_section_info (tree decl, rtx
*** 2340,2345 ****
--- 2345,2356 ----
      v850_encode_data_area (decl, XEXP (rtl, 0));
  }
  
+ static int
+ v850_use_dfa_pipeline_interface (void)
+ {
+   return 1;
+ }
+ 
  /* Return true if the given RTX is a register which can be restored
     by a function epilogue.  */
  int
Index: config/v850/v850.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/v850/v850.md,v
retrieving revision 1.28
diff -c -3 -p -r1.28 v850.md
*** config/v850/v850.md	2 Feb 2004 15:18:28 -0000	1.28
--- config/v850/v850.md	5 Jun 2004 11:40:43 -0000
***************
*** 61,70 ****
  ;; Function units for the V850.  As best as I can tell, there's
  ;; a traditional memory load/use stall as well as a stall if
  ;; the result of a multiply is used too early.
- ;;
- (define_function_unit "memory" 1 0 (eq_attr "type" "load") 2 0)
- (define_function_unit "mult"   1 0 (eq_attr "type" "mult") 2 0)
  
  
  ;; ----------------------------------------------------------------------
  ;; MOVE INSTRUCTIONS
--- 61,76 ----
  ;; Function units for the V850.  As best as I can tell, there's
  ;; a traditional memory load/use stall as well as a stall if
  ;; the result of a multiply is used too early.
  
+ (define_insn_reservation "v850_other" 1
+ 			 (eq_attr "type" "other")
+ 			 "nothing")
+ (define_insn_reservation "v850_mult" 2
+ 			 (eq_attr "type" "mult")
+ 			 "nothing")
+ (define_insn_reservation "v850_memory" 2
+ 			 (eq_attr "type" "load")
+ 			 "nothing")
  
  ;; ----------------------------------------------------------------------
  ;; MOVE INSTRUCTIONS


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