aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOllie Wild <aaw@google.com>2008-05-16 22:02:13 +0000
committerOllie Wild <aaw@google.com>2008-05-16 22:02:13 +0000
commit0537adb738a4df4ec7e07fee5fef72c745dd61ed (patch)
treea9900f4f403a4509f60ee1d6929b43087f19c281
parent1b4c7dea26327eefb0acd0a0585602dd9edb7fe4 (diff)
gcc/lto/
* lto-lang.c (tree-inline.h): Include. (lto_post_options): New function. (LANG_HOOKS_POST_OPTIONS): Define. * lto-cgraph-in.c (overwrite_node): Set node->global.insns. * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt). git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@135447 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/lto/ChangeLog8
-rw-r--r--gcc/lto/lto-cgraph-in.c1
-rw-r--r--gcc/lto/lto-function-in.c1
-rw-r--r--gcc/lto/lto-lang.c32
4 files changed, 42 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 29fa8d9a374..4a6db0087c6 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-16 Ollie Wild <aaw@google.com>
+
+ * lto-lang.c (tree-inline.h): Include.
+ (lto_post_options): New function.
+ (LANG_HOOKS_POST_OPTIONS): Define.
+ * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
+ * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
+
2008-05-13 Diego Novillo <dnovillo@google.com>
* lto-function-in.c (input_ssa_names): Call
diff --git a/gcc/lto/lto-cgraph-in.c b/gcc/lto/lto-cgraph-in.c
index 2c1b387bb8d..b0536b1be63 100644
--- a/gcc/lto/lto-cgraph-in.c
+++ b/gcc/lto/lto-cgraph-in.c
@@ -88,6 +88,7 @@ overwrite_node (struct data_in *data_in,
node->aux = (void *)tag;
node->local.inline_summary.estimated_self_stack_size = stack_size;
node->local.inline_summary.self_insns = self_insns;
+ node->global.insns = self_insns;
if (!node->local.lto_file_data)
node->local.lto_file_data = xcalloc (1, sizeof (struct lto_file_decl_data));
diff --git a/gcc/lto/lto-function-in.c b/gcc/lto/lto-function-in.c
index 2b70f1f0791..56944febfb0 100644
--- a/gcc/lto/lto-function-in.c
+++ b/gcc/lto/lto-function-in.c
@@ -1472,6 +1472,7 @@ input_bb (struct lto_input_block *ib, enum LTO_tags tag,
while (tag)
{
tree stmt = input_expr_operand (ib, data_in, fn, tag);
+ TREE_BLOCK (stmt) = DECL_INITIAL (fn->decl);
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
LTO_DEBUG_INDENT_TOKEN ("stmt");
tag = input_record_start (ib);
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index 093e5f1f2d7..936a65b04ae 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -31,6 +31,7 @@ Boston, MA 02110-1301, USA. */
#include "debug.h"
#include "lto-tree.h"
#include "lto.h"
+#include "tree-inline.h"
#include "toplev.h"
/* Tables of information about tree codes. */
@@ -322,6 +323,35 @@ lto_handle_option (size_t scode, const char *arg, int value)
return result;
}
+/* Perform post-option processing. Does additional initialization based on
+ command-line options. PFILENAME is the main input filename. Returns false
+ to enable subsequent back-end initialization. */
+
+static bool
+lto_post_options (const char **pfilename ATTRIBUTE_UNUSED)
+{
+ /* Use tree inlining. */
+ flag_inline_trees = 1;
+
+ /* Other front ends have code like:
+
+ if (!flag_no_inline)
+ flag_no_inline = 1;
+ if (flag_inline_functions)
+ flag_inline_trees = 2;
+
+ As far as I can tell, though, the flag_no_inline assignment doesn't do
+ anything because flag_really_no_inline has already been set.
+
+ The (flag_inline_trees == 2) condition is *only* used inside
+ grokdeclarator, which is never invoked inside lto1.
+
+ I think inlining is in need of some serious cleanup. */
+
+ /* Initialize the compiler back end. */
+ return false;
+}
+
static bool
lto_mark_addressable (tree t ATTRIBUTE_UNUSED)
{
@@ -619,6 +649,8 @@ static void lto_init_ts (void)
#define LANG_HOOKS_INIT_OPTIONS lto_init_options
#undef LANG_HOOKS_HANDLE_OPTION
#define LANG_HOOKS_HANDLE_OPTION lto_handle_option
+#undef LANG_HOOKS_POST_OPTIONS
+#define LANG_HOOKS_POST_OPTIONS lto_post_options
#define LANG_HOOKS_MARK_ADDRESSABLE lto_mark_addressable
#define LANG_HOOKS_TYPE_FOR_MODE lto_type_for_mode
#define LANG_HOOKS_TYPE_FOR_SIZE lto_type_for_size