[patch] Use targetm.foo instead of (*targetm.foo)

Kazu Hirata kazu@cs.umass.edu
Tue Apr 26 17:14:00 GMT 2005


Hi,

Attached is a patch to use targetm.foo instead of (*targetm.foo).

IIRC, we agreed to prefer the former form a while ago.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-04-26  Kazu Hirata  <kazu@cs.umass.edu>

	* modulo-sched.c, tree-stdarg.c: Use targetm.foo instead of
	(*targetm.foo).

Index: modulo-sched.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/modulo-sched.c,v
retrieving revision 1.28
diff -u -d -p -r1.28 modulo-sched.c
--- modulo-sched.c	21 Apr 2005 15:47:33 -0000	1.28
+++ modulo-sched.c	23 Apr 2005 22:17:28 -0000
@@ -1000,7 +1000,7 @@ sms_schedule (FILE *dump_file)
       int temp = reload_completed;
 
       reload_completed = 1;
-      issue_rate = (*targetm.sched.issue_rate) ();
+      issue_rate = targetm.sched.issue_rate ();
       reload_completed = temp;
     }
   else
@@ -2342,13 +2342,13 @@ advance_one_cycle (void)
 {
   if (targetm.sched.dfa_pre_cycle_insn)
     state_transition (curr_state,
-		      (*targetm.sched.dfa_pre_cycle_insn) ());
+		      targetm.sched.dfa_pre_cycle_insn ());
 
   state_transition (curr_state, NULL);
 
   if (targetm.sched.dfa_post_cycle_insn)
     state_transition (curr_state,
-		      (*targetm.sched.dfa_post_cycle_insn) ());
+		      targetm.sched.dfa_post_cycle_insn ());
 }
 
 /* Given the kernel of a loop (from FIRST_INSN to LAST_INSN), finds
@@ -2392,8 +2392,8 @@ kernel_number_of_cycles (rtx first_insn,
 
       if (targetm.sched.variable_issue)
 	can_issue_more =
-	  (*targetm.sched.variable_issue) (sched_dump, sched_verbose,
-					   insn, can_issue_more);
+	  targetm.sched.variable_issue (sched_dump, sched_verbose,
+					insn, can_issue_more);
       /* A naked CLOBBER or USE generates no instruction, so don't
 	 let them consume issue slots.  */
       else if (GET_CODE (PATTERN (insn)) != USE
@@ -2440,8 +2440,8 @@ ps_has_conflicts (partial_schedule_ptr p
 
 	  if (targetm.sched.variable_issue)
 	    can_issue_more =
-	      (*targetm.sched.variable_issue) (sched_dump, sched_verbose,
-					       insn, can_issue_more);
+	      targetm.sched.variable_issue (sched_dump, sched_verbose,
+					    insn, can_issue_more);
 	  /* A naked CLOBBER or USE generates no instruction, so don't
 	     let them consume issue slots.  */
 	  else if (GET_CODE (PATTERN (insn)) != USE
Index: tree-stdarg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-stdarg.c,v
retrieving revision 2.3
diff -u -d -p -r2.3 tree-stdarg.c
--- tree-stdarg.c	9 Apr 2005 17:19:06 -0000	2.3
+++ tree-stdarg.c	23 Apr 2005 22:17:30 -0000
@@ -783,7 +783,7 @@ execute_optimize_stdarg (void)
 
 		  /* Do any architecture specific checking.  */
 		  else if (targetm.stdarg_optimize_hook
-			   && (*targetm.stdarg_optimize_hook) (&si, lhs, rhs))
+			   && targetm.stdarg_optimize_hook (&si, lhs, rhs))
 		    continue;
 		}
 	    }



More information about the Gcc-patches mailing list