-static tree
-fix_unsafe_tree (tree t)
-{
- switch (unsafe_for_reeval (t))
- {
- case 0: /* Safe. */
- break;
-
- case 1: /* Mildly unsafe. */
- t = unsave_expr (t);
- break;
-
- case 2: /* Wildly unsafe. */
- {
- tree var = build_decl (VAR_DECL, NULL_TREE,
- TREE_TYPE (t));
- SET_DECL_RTL (var,
- expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL));
- t = var;
- }
- break;
-
- default:
- abort ();
- }
- return t;
-}
-
-
-/* If function value *VALUE was returned at the most significant end of a
- register, shift it towards the least significant end and convert it to
- TYPE's mode. Return true and update *VALUE if some action was needed.
-
- TYPE is the type of the function's return value, which is known not
- to have mode BLKmode. */
-
-static bool
-shift_returned_value (tree type, rtx *value)
-{
- if (targetm.calls.return_in_msb (type))
- {
- HOST_WIDE_INT shift;
-
- shift = (GET_MODE_BITSIZE (GET_MODE (*value))
- - BITS_PER_UNIT * int_size_in_bytes (type));
- if (shift > 0)
- {
- /* Shift the value into the low part of the register. */
- *value = expand_binop (GET_MODE (*value), lshr_optab, *value,
- GEN_INT (shift), 0, 1, OPTAB_WIDEN);
-
- /* Truncate it to the type's mode, or its integer equivalent.
- This is subject to TRULY_NOOP_TRUNCATION. */
- *value = convert_to_mode (int_mode_for_mode (TYPE_MODE (type)),
- *value, 0);
-
- /* Now convert it to the final form. */
- *value = gen_lowpart (TYPE_MODE (type), *value);
- return true;
- }
- }
- return false;
-}
-
-/* Remove all REG_EQUIV notes found in the insn chain. */
-
-static void
-purge_reg_equiv_notes (void)
-{
- rtx insn;
-
- for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
- {
- while (1)
- {
- rtx note = find_reg_note (insn, REG_EQUIV, 0);
- if (note)
- {
- /* Remove the note and keep looking at the notes for
- this insn. */
- remove_note (insn, note);
- continue;
- }
- break;
- }
- }
-}
-
-/* Clear RTX_UNCHANGING_P flag of incoming argument MEMs. */