diff options
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/gcc/function.c b/gcc/function.c index ea0eba8..e746b3f 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2169,49 +2169,6 @@ use_register_for_decl (const_tree decl) return true; } -/* Return true if TYPE should be passed by invisible reference. */ - -bool -pass_by_reference (CUMULATIVE_ARGS *ca, machine_mode mode, - tree type, bool named_arg) -{ - if (type) - { - /* If this type contains non-trivial constructors, then it is - forbidden for the middle-end to create any new copies. */ - if (TREE_ADDRESSABLE (type)) - return true; - - /* GCC post 3.4 passes *all* variable sized types by reference. */ - if (!TYPE_SIZE (type) || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) - return true; - - /* If a record type should be passed the same as its first (and only) - member, use the type and mode of that member. */ - if (TREE_CODE (type) == RECORD_TYPE && TYPE_TRANSPARENT_AGGR (type)) - { - type = TREE_TYPE (first_field (type)); - mode = TYPE_MODE (type); - } - } - - return targetm.calls.pass_by_reference (pack_cumulative_args (ca), mode, - type, named_arg); -} - -/* Return true if TYPE, which is passed by reference, should be callee - copied instead of caller copied. */ - -bool -reference_callee_copied (CUMULATIVE_ARGS *ca, machine_mode mode, - tree type, bool named_arg) -{ - if (type && TREE_ADDRESSABLE (type)) - return false; - return targetm.calls.callee_copies (pack_cumulative_args (ca), mode, type, - named_arg); -} - /* Structures to communicate between the subroutines of assign_parms. The first holds data persistent across all parameters, the second is cleared out for each parameter. */ |