aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/gcc-interface/misc.c2
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/cilk.c2
-rw-r--r--gcc/calls.c44
-rw-r--r--gcc/calls.h5
-rw-r--r--gcc/cfgloop.h2
-rw-r--r--gcc/emit-rtl.h30
-rw-r--r--gcc/function.c43
-rw-r--r--gcc/function.h32
-rw-r--r--gcc/ipa-chkp.c1
12 files changed, 102 insertions, 79 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 32e5351..a45adfd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2015-06-25 Andrew MacLeod <amacleod@redhat.com>
+
+ * function.h (struct incoming_args): Move struct.
+ (pass_by_reference, reference_callee_copied): Remove prototypes.
+ * emit-rtl.h (struct incoming_args): Relocate struct here.
+ * calls.h (pass_by_reference, reference_callee_copied): Relocate
+ prototypes here.
+ * function.c (pass_by_reference, reference_callee_copied): Move.
+ * calls.c (pass_by_reference, reference_callee_copied): Relocate here.
+ * cfgloop.h: Don't include tm.h or hard-reg-set.h.
+ * ipa-chkp.c: Include calls.h.
+
2015-06-25 Andrew Macleod <amacleod@redhat.com>
* alias.h (alias_set_type): Move typedef.
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 801be51..09d1ef9 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-25 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc-interface/misc.c: Include calls.h not function.h.
+
2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (record_builtin_type): Adjust comment.
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 55d40dd..bb11ce4 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -48,7 +48,7 @@
#include "plugin.h"
#include "hashtab.h"
#include "hard-reg-set.h"
-#include "function.h" /* For pass_by_reference. */
+#include "calls.h" /* For pass_by_reference. */
#include "dwarf2out.h"
#include "ada.h"
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index e2a2d76..61afc6a 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-25 Andrew MacLeod <amacleod@redhat.com>
+
+ * cilk.c: Move calls.h after tm.h in the include chain.
+
2015-06-25 Marek Polacek <polacek@redhat.com>
* array-notation-common.c: Use VAR_P throughout.
diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c
index 958df27..29ac1b2 100644
--- a/gcc/c-family/cilk.c
+++ b/gcc/c-family/cilk.c
@@ -29,7 +29,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "fold-const.h"
#include "stringpool.h"
-#include "calls.h"
#include "langhooks.h"
#include "gimple-expr.h"
#include "gimplify.h"
@@ -41,6 +40,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "hard-reg-set.h"
#include "function.h"
+#include "calls.h"
#include "ipa-ref.h"
#include "cgraph.h"
#include "diagnostic.h"
diff --git a/gcc/calls.c b/gcc/calls.c
index 5cf0dca..7cb2c3d 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -858,6 +858,50 @@ call_expr_flags (const_tree t)
return flags;
}
+/* 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);
+}
+
+
/* Precompute all register parameters as described by ARGS, storing values
into fields within the ARGS array.
diff --git a/gcc/calls.h b/gcc/calls.h
index fc8458c..7cea2c12 100644
--- a/gcc/calls.h
+++ b/gcc/calls.h
@@ -32,6 +32,11 @@ extern bool shift_return_value (machine_mode, bool, rtx);
extern rtx expand_call (tree, rtx, int);
extern void fixup_tail_calls (void);
+extern bool pass_by_reference (CUMULATIVE_ARGS *, machine_mode,
+ tree, bool);
+extern bool reference_callee_copied (CUMULATIVE_ARGS *, machine_mode,
+ tree, bool);
+
#endif // GCC_CALLS_H
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 0620342..29b626a 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -22,8 +22,6 @@ along with GCC; see the file COPYING3. If not see
#include "bitmap.h"
#include "sbitmap.h"
-#include "tm.h"
-#include "hard-reg-set.h"
#include "function.h"
#include "cfgloopmanip.h"
diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h
index cccb1ac..f52c335 100644
--- a/gcc/emit-rtl.h
+++ b/gcc/emit-rtl.h
@@ -23,6 +23,36 @@ along with GCC; see the file COPYING3. If not see
struct temp_slot;
typedef struct temp_slot *temp_slot_p;
+/* Information mainlined about RTL representation of incoming arguments. */
+struct GTY(()) incoming_args {
+ /* Number of bytes of args popped by function being compiled on its return.
+ Zero if no bytes are to be popped.
+ May affect compilation of return insn or of function epilogue. */
+ int pops_args;
+
+ /* If function's args have a fixed size, this is that size, in bytes.
+ Otherwise, it is -1.
+ May affect compilation of return insn or of function epilogue. */
+ int size;
+
+ /* # bytes the prologue should push and pretend that the caller pushed them.
+ The prologue must do this, but only if parms can be passed in
+ registers. */
+ int pretend_args_size;
+
+ /* This is the offset from the arg pointer to the place where the first
+ anonymous arg can be found, if there is one. */
+ rtx arg_offset_rtx;
+
+ /* Quantities of various kinds of registers
+ used for the current function's args. */
+ CUMULATIVE_ARGS info;
+
+ /* The arg pointer hard register, or the pseudo into which it was copied. */
+ rtx internal_arg_pointer;
+};
+
+
/* Datastructures maintained for currently processed function in RTL form. */
struct GTY(()) rtl_data {
struct expr_status expr;
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. */
diff --git a/gcc/function.h b/gcc/function.h
index 54fea4b..f9b2468 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -169,34 +169,6 @@ struct GTY(()) varasm_status {
unsigned int deferred_constants;
};
-/* Information mainlined about RTL representation of incoming arguments. */
-struct GTY(()) incoming_args {
- /* Number of bytes of args popped by function being compiled on its return.
- Zero if no bytes are to be popped.
- May affect compilation of return insn or of function epilogue. */
- int pops_args;
-
- /* If function's args have a fixed size, this is that size, in bytes.
- Otherwise, it is -1.
- May affect compilation of return insn or of function epilogue. */
- int size;
-
- /* # bytes the prologue should push and pretend that the caller pushed them.
- The prologue must do this, but only if parms can be passed in
- registers. */
- int pretend_args_size;
-
- /* This is the offset from the arg pointer to the place where the first
- anonymous arg can be found, if there is one. */
- rtx arg_offset_rtx;
-
- /* Quantities of various kinds of registers
- used for the current function's args. */
- CUMULATIVE_ARGS info;
-
- /* The arg pointer hard register, or the pseudo into which it was copied. */
- rtx internal_arg_pointer;
-};
/* Data for function partitioning. */
struct GTY(()) function_subsections {
@@ -610,10 +582,6 @@ extern bool initial_value_entry (int i, rtx *, rtx *);
extern void instantiate_decl_rtl (rtx x);
extern int aggregate_value_p (const_tree, const_tree);
extern bool use_register_for_decl (const_tree);
-extern bool pass_by_reference (CUMULATIVE_ARGS *, machine_mode,
- tree, bool);
-extern bool reference_callee_copied (CUMULATIVE_ARGS *, machine_mode,
- tree, bool);
extern gimple_seq gimplify_parameters (void);
extern void locate_and_pad_parm (machine_mode, tree, int, int, int,
tree, struct args_size *,
diff --git a/gcc/ipa-chkp.c b/gcc/ipa-chkp.c
index 96f269c..c0bc432 100644
--- a/gcc/ipa-chkp.c
+++ b/gcc/ipa-chkp.c
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "hard-reg-set.h"
#include "function.h"
+#include "calls.h"
#include "tree-ssa-alias.h"
#include "predict.h"
#include "basic-block.h"