-2004-04-09 Jan Beulich <jbeulich@novell.com>
+2004-07-09 Steven Bosscher <stevenb@suse.de>
+
+ * doc/md.texi (Processor pipeline description): Mention that
+ the old pipeline description is deprecated.
+
+ * config/rs6000/7450.md (automaton ppc7450): Split up, move
+ mciu_7450 function unit to...
+ (automaton ppc7450mciu): ...new automaton.
+
+ * haifa-sched.c (insert_schedule_bubbles_p): Remove.
+ (schedule_block): Don't consider inserting bubbles.
+ (sched_init): Don't initialize DFA bubbles.
+ * target-def.h (TARGET_SCHED_INIT_DFA_BUBBLES,
+ TARGET_SCHED_DFA_BUBBLE): Remove.
+ * target.h (init_dfa_bubbles, dfa_bubble): Remove hooks.
+ * doc/tm.texi (TARGET_SCHED_INIT_DFA_BUBBLES,
+ TARGET_SCHED_DFA_BUBBLE): Remove documentation.
+
+ * stmt.c (conditional_context): Remove prototype.
+ * tree.h (conditional_context): Remove.
+ * tree-cfg.c (pre_insert_on_edge): Remove.
+
+ * c-common.h (c_expand_asm_operands): Remove prototype.
+ * c-typeck.c (c_expand_asm_operands): Remove.
+
+2004-07-09 Jan Beulich <jbeulich@novell.com>
* config/i386/i386.c (classify_argument): Treat V1xx modes the same as
their base modes. CTImode, TCmode, and XCmode must be passed in memory.
MMX areguments and return values are passed in XMM registers).
(sse2_umulsidi3): Correct type and mode.
-2004-04-09 Richard Henderson <rth@redhat.com>
+2004-07-09 Richard Henderson <rth@redhat.com>
* tree-cfg.c (dump_cfg_stats): Fix 64-bit format mismatch errors.
extern tree build_continue_stmt (void);
extern tree build_break_stmt (void);
-extern void c_expand_asm_operands (tree, tree, tree, tree, int, location_t);
-
/* These functions must be defined by each front-end which implements
a variant of the C language. They are used in c-common.c. */
}
return args;
}
-
-/* Expand an ASM statement with operands, handling output operands
- that are not variables or INDIRECT_REFS by transforming such
- cases into cases that expand_asm_operands can handle.
-
- Arguments are same as for expand_asm_operands. */
-
-void
-c_expand_asm_operands (tree string, tree outputs, tree inputs,
- tree clobbers, int vol, location_t locus)
-{
- int noutputs = list_length (outputs);
- int i;
- /* o[I] is the place that output number I should be written. */
- tree *o = alloca (noutputs * sizeof (tree));
- tree tail;
-
- /* Record the contents of OUTPUTS before it is modified. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- {
- o[i] = TREE_VALUE (tail);
- if (o[i] == error_mark_node)
- return;
- }
-
- /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of
- OUTPUTS some trees for where the values were actually stored. */
- expand_asm_operands (string, outputs, inputs, clobbers, vol, locus);
-
- /* Copy all the intermediate outputs into the specified outputs. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- {
- if (o[i] != TREE_VALUE (tail))
- {
- expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
- NULL_RTX, VOIDmode, EXPAND_NORMAL);
- free_temp_slots ();
-
- /* Restore the original value so that it's correct the next
- time we expand this function. */
- TREE_VALUE (tail) = o[i];
- }
- /* Detect modification of read-only values.
- (Otherwise done by build_modify_expr.) */
- else
- {
- tree type = TREE_TYPE (o[i]);
- if (TREE_READONLY (o[i])
- || TYPE_READONLY (type)
- || ((TREE_CODE (type) == RECORD_TYPE
- || TREE_CODE (type) == UNION_TYPE)
- && C_TYPE_FIELDS_READONLY (type)))
- readonly_error (o[i], "modification by `asm'");
- }
- }
-
- /* Those MODIFY_EXPRs could do autoincrements. */
- emit_queue ();
-}
\f
/* Generate a goto statement to LABEL. */
;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
;; MA 02111-1307, USA.
-(define_automaton "ppc7450,ppc7450fp,ppc7450vec")
-(define_cpu_unit "iu1_7450,iu2_7450,iu3_7450,mciu_7450" "ppc7450")
+(define_automaton "ppc7450,ppc7450mciu,ppc7450fp,ppc7450vec")
+(define_cpu_unit "iu1_7450,iu2_7450,iu3_7450" "ppc7450")
+(define_cpu_unit "mciu_7450" "ppc7450mciu")
(define_cpu_unit "fpu_7450" "ppc7450fp")
(define_cpu_unit "lsu_7450,bpu_7450" "ppc7450")
(define_cpu_unit "du1_7450,du2_7450,du3_7450" "ppc7450")
+2004-07-09 Steven Bosscher <stevenb@suse.de>
+
+ * typeck.c (c_expand_asm_operands): Remove.
+
2004-07-09 Mike Stump <mrs@apple.com>
* typeck.c (build_class_member_access_expr): Skip null deref
return convert_for_assignment (type, rhs, errtype, fndecl, parmnum);
}
\f
-/* Expand an ASM statement with operands, handling output operands
- that are not variables or INDIRECT_REFS by transforming such
- cases into cases that expand_asm_operands can handle.
-
- Arguments are same as for expand_asm_operands.
-
- We don't do default conversions on all inputs, because it can screw
- up operands that are expected to be in memory. */
-
-void
-c_expand_asm_operands (tree string, tree outputs, tree inputs, tree clobbers,
- int vol, location_t locus)
-{
- int noutputs = list_length (outputs);
- int i;
- /* o[I] is the place that output number I should be written. */
- tree *o = alloca (noutputs * sizeof (tree));
- tree tail;
-
- /* Record the contents of OUTPUTS before it is modified. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- o[i] = TREE_VALUE (tail);
-
- /* Generate the ASM_OPERANDS insn;
- store into the TREE_VALUEs of OUTPUTS some trees for
- where the values were actually stored. */
- expand_asm_operands (string, outputs, inputs, clobbers, vol, locus);
-
- /* Copy all the intermediate outputs into the specified outputs. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- {
- if (o[i] != TREE_VALUE (tail))
- {
- expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
- const0_rtx, VOIDmode, EXPAND_NORMAL);
- free_temp_slots ();
-
- /* Restore the original value so that it's correct the next
- time we expand this function. */
- TREE_VALUE (tail) = o[i];
- }
- /* Detect modification of read-only values.
- (Otherwise done by build_modify_expr.) */
- else
- {
- tree type = TREE_TYPE (o[i]);
- if (type != error_mark_node
- && (CP_TYPE_CONST_P (type)
- || (CLASS_TYPE_P (type) && C_TYPE_FIELDS_READONLY (type))))
- readonly_error (o[i], "modification by `asm'", 1);
- }
- }
-
- /* Those MODIFY_EXPRs could do autoincrements. */
- emit_queue ();
-}
-\f
/* If RETVAL is the address of, or a reference to, a local variable or
temporary give an appropriate warning. */
processor parallelism (or @dfn{pipeline description}). Currently GCC
provides two alternative ways to describe processor parallelism,
both described below. The first method is outlined in the next section;
-it was once the only method provided by GCC, and thus is used in a number
-of exiting ports. The second, and preferred method, specifies functional
-unit reservations for groups of instructions with the aid of @dfn{regular
-expressions}. This is called the @dfn{automaton based description}.
+it specifies functional unit reservations for groups of instructions
+with the aid of @dfn{regular expressions}. This is called the
+@dfn{automaton based description}. The second method is called the
+@dfn{old pipeline description}. This method specifies usage of
+function units for classes of insns. This description is not as
+powerful or accurate as the automaton based description, because it
+is impossible to model instructions that use more than one function
+unit. The second method is deprecated; new ports should use the
+automaton based description.
The GCC instruction scheduler uses a @dfn{pipeline hazard recognizer} to
figure out the possibility of the instruction issue by the processor
on processor complexity. The instruction issue is possible if there is
a transition from one automaton state to another one.
-You can use either model to describe processor pipeline
-characteristics or even mix them. You could use the old description
-for some processor submodels and the @acronym{DFA}-based one for other
-processor submodels.
-
-In general, using the automaton based description is preferred. Its
-model is richer and makes it possible to more accurately describe
-pipeline characteristics of processors, which results in improved
-code quality (although sometimes only marginally). It will also be
-used as an infrastructure to implement sophisticated and practical
-instruction scheduling which will try many instruction sequences to
-choose the best one.
-
-
@menu
* Old pipeline description:: Specifying information for insn scheduling.
* Automaton pipeline description:: Describing insn pipeline characteristics.
@cindex old pipeline description
@cindex function units, for scheduling
+@emph{Note:}The old pipeline description is deprecated.
+
On most @acronym{RISC} machines, there are instructions whose results
are not available for a specific number of cycles. Common cases are
instructions that load data from memory. On many machines, a pipeline
issued and the current processor cycle.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_SCHED_INIT_DFA_BUBBLES (void)
-The @acronym{DFA}-based scheduler could take the insertion of nop
-operations for better insn scheduling into account. It can be done
-only if the multi-pass insn scheduling works (see hook
-@samp{TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD}).
-
-Let us consider a @acronym{VLIW} processor insn with 3 slots. Each
-insn can be placed only in one of the three slots. We have 3 ready
-insns @var{A}, @var{B}, and @var{C}. @var{A} and @var{C} can be
-placed only in the 1st slot, @var{B} can be placed only in the 3rd
-slot. We described the automaton which does not permit empty slot
-gaps between insns (usually such description is simpler). Without
-this code the scheduler would place each insn in 3 separate
-@acronym{VLIW} insns. If the scheduler places a nop insn into the 2nd
-slot, it could place the 3 insns into 2 @acronym{VLIW} insns. What is
-the nop insn is returned by hook @samp{TARGET_SCHED_DFA_BUBBLE}. Hook
-@samp{TARGET_SCHED_INIT_DFA_BUBBLES} can be used to initialize or
-create the nop insns.
-
-You should remember that the scheduler does not insert the nop insns.
-It is not wise because of the following optimizations. The scheduler
-only considers such possibility to improve the result schedule. The
-nop insns should be inserted lately, e.g. on the final phase.
-@end deftypefn
-
-@deftypefn {Target Hook} rtx TARGET_SCHED_DFA_BUBBLE (int @var{index})
-This hook @samp{FIRST_CYCLE_MULTIPASS_SCHEDULING} is used to insert
-nop operations for better insn scheduling when @acronym{DFA}-based
-scheduler makes multipass insn scheduling (see also description of
-hook @samp{TARGET_SCHED_INIT_DFA_BUBBLES}). This hook
-returns a nop insn with given @var{index}. The indexes start with
-zero. The hook should return @code{NULL} if there are no more nop
-insns with indexes greater than given index.
-@end deftypefn
-
@deftypefn {Target Hook} bool TARGET_SCHED_IS_COSTLY_DEPENDENCE (rtx @var{insn1}, rtx @var{insn2}, rtx @var{dep_link}, int @var{dep_cost}, int @var{distance})
This hook is used to define which dependences are considered costly by
the target, so costly that it is not advisable to schedule the insns that
static int issue_rate;
-/* If the following variable value is nonzero, the scheduler inserts
- bubbles (nop insns). The value of variable affects on scheduler
- behavior only if automaton pipeline interface with multipass
- scheduling is used and hook dfa_bubble is defined. */
-int insert_schedule_bubbles_p = 0;
-
/* sched-verbose controls the amount of debugging output the
scheduler prints. It is controlled by -fsched-verbose=N:
N>0 and no -DSR : the output is directed to stderr.
else
{
cost = state_transition (temp_state, insn);
-
- if (targetm.sched.first_cycle_multipass_dfa_lookahead
- && targetm.sched.dfa_bubble)
- {
- if (cost == 0)
- {
- int j;
- rtx bubble;
-
- for (j = 0;
- (bubble = targetm.sched.dfa_bubble (j))
- != NULL_RTX;
- j++)
- {
- memcpy (temp_state, curr_state, dfa_state_size);
-
- if (state_transition (temp_state, bubble) < 0
- && state_transition (temp_state, insn) < 0)
- break;
- }
-
- if (bubble != NULL_RTX)
- {
- if (insert_schedule_bubbles_p)
- {
- rtx copy;
-
- copy = copy_rtx (PATTERN (bubble));
- emit_insn_after (copy, last_scheduled_insn);
- last_scheduled_insn
- = NEXT_INSN (last_scheduled_insn);
- INSN_CODE (last_scheduled_insn)
- = INSN_CODE (bubble);
-
- /* Annotate the same for the first insns
- scheduling by using mode. */
- PUT_MODE (last_scheduled_insn,
- (clock_var > last_clock_var
- ? clock_var - last_clock_var
- : VOIDmode));
- last_clock_var = clock_var;
-
- if (sched_verbose >= 2)
- {
- fprintf (sched_dump,
- ";;\t\t--> scheduling bubble insn <<<%d>>>:reservation ",
- INSN_UID (last_scheduled_insn));
-
- if (recog_memoized (last_scheduled_insn)
- < 0)
- fprintf (sched_dump, "nothing");
- else
- print_reservation
- (sched_dump, last_scheduled_insn);
-
- fprintf (sched_dump, "\n");
- }
- }
- cost = -1;
- }
- }
- }
-
if (cost < 0)
cost = 0;
else if (cost == 0)
if (targetm.sched.init_dfa_post_cycle_insn)
targetm.sched.init_dfa_post_cycle_insn ();
- if (targetm.sched.first_cycle_multipass_dfa_lookahead
- && targetm.sched.init_dfa_bubbles)
- targetm.sched.init_dfa_bubbles ();
-
dfa_start ();
dfa_state_size = state_size ();
curr_state = xmalloc (dfa_state_size);
return 0;
}
-/* True if we are currently emitting insns in an area of output code
- that is controlled by a conditional expression. This is used by
- the cleanup handling code to generate conditional cleanup actions. */
-
-int
-conditional_context (void)
-{
- return block_stack && block_stack->data.block.conditional_code;
-}
-
/* Return an opaque pointer to the current nesting level, so frontend code
can check its own sanity. */
#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD 0
#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD 0
#define TARGET_SCHED_DFA_NEW_CYCLE 0
-#define TARGET_SCHED_INIT_DFA_BUBBLES 0
-#define TARGET_SCHED_DFA_BUBBLE 0
#define TARGET_SCHED_IS_COSTLY_DEPENDENCE 0
#define TARGET_SCHED \
TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, \
TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD, \
TARGET_SCHED_DFA_NEW_CYCLE, \
- TARGET_SCHED_INIT_DFA_BUBBLES, \
- TARGET_SCHED_DFA_BUBBLE, \
TARGET_SCHED_IS_COSTLY_DEPENDENCE}
/* In tree.c. */
the previous insn has been issued and the current processor
cycle. */
int (* dfa_new_cycle) (FILE *, int, rtx, int, int, int *);
- /* The values of the following members are pointers to functions
- used to improve the first cycle multipass scheduling by
- inserting nop insns. dfa_scheduler_bubble gives a function
- returning a nop insn with given index. The indexes start with
- zero. The function should return NULL if there are no more nop
- insns with indexes greater than given index. To initialize the
- nop insn the function given by member
- init_dfa_scheduler_bubbles is used. The default values of the
- members result in not inserting nop insns during the multipass
- scheduling. */
- void (* init_dfa_bubbles) (void);
- rtx (* dfa_bubble) (int);
/* The following member value is a pointer to a function called
by the insn scheduler. It should return true if there exists a
dependence which is considered costly by the target, between
}
-/* Specialized edge insertion for SSA-PRE. FIXME: This should
- probably disappear. The only reason it's here is because PRE needs
- the call to tree_find_edge_insert_loc(). */
-
-void pre_insert_on_edge (edge e, tree stmt);
-
-void
-pre_insert_on_edge (edge e, tree stmt)
-{
- block_stmt_iterator bsi;
-
- if (PENDING_STMT (e))
- abort ();
-
- if (tree_find_edge_insert_loc (e, &bsi))
- bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
- else
- bsi_insert_before (&bsi, stmt, BSI_NEW_STMT);
-}
-
-
/*---------------------------------------------------------------------------
Tree specific functions for CFG manipulation
---------------------------------------------------------------------------*/
extern void warn_about_unused_variables (tree);
extern int is_body_block (tree);
-extern int conditional_context (void);
extern struct nesting * current_nesting_level (void);
extern void expand_start_case (int, tree, tree, const char *);
extern void expand_end_case_type (tree, tree);