summaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99440.patch
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99440.patch')
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99440.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99440.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99440.patch
new file mode 100644
index 0000000000..b7a28de658
--- /dev/null
+++ b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99440.patch
@@ -0,0 +1,78 @@
12010-11-24 Chung-Lin Tang <cltang@codesourcery.com>
2
3 2010-07-08 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4
5 PR bootstrap/44768
6
7 * cfgexpand.c (estimated_stack_frame_size): Make self-contained
8 with respect to current_function_decl. Pass decl of the function.
9 * tree-inline.h (estimated_stack_frame_size): Adjust prototype.
10 * ipa-inline.c (compute_inline_parameters): Pass decl to
11 estimated_stack_frame_size.
12
13=== modified file 'gcc/cfgexpand.c'
14--- old/gcc/cfgexpand.c 2010-10-04 00:50:43 +0000
15+++ new/gcc/cfgexpand.c 2010-11-24 08:43:48 +0000
16@@ -1248,8 +1248,8 @@
17 stack_vars_alloc = stack_vars_num = 0;
18 }
19
20-/* Make a fair guess for the size of the stack frame of the current
21- function. This doesn't have to be exact, the result is only used
22+/* Make a fair guess for the size of the stack frame of the decl
23+ passed. This doesn't have to be exact, the result is only used
24 in the inline heuristics. So we don't want to run the full stack
25 var packing algorithm (which is quadratic in the number of stack
26 vars). Instead, we calculate the total size of all stack vars.
27@@ -1257,11 +1257,14 @@
28 vars doesn't happen very often. */
29
30 HOST_WIDE_INT
31-estimated_stack_frame_size (void)
32+estimated_stack_frame_size (tree decl)
33 {
34 HOST_WIDE_INT size = 0;
35 size_t i;
36 tree t, outer_block = DECL_INITIAL (current_function_decl);
37+ tree old_cur_fun_decl = current_function_decl;
38+ current_function_decl = decl;
39+ push_cfun (DECL_STRUCT_FUNCTION (decl));
40
41 init_vars_expansion ();
42
43@@ -1284,7 +1287,8 @@
44 size += account_stack_vars ();
45 fini_vars_expansion ();
46 }
47-
48+ pop_cfun ();
49+ current_function_decl = old_cur_fun_decl;
50 return size;
51 }
52
53
54=== modified file 'gcc/ipa-inline.c'
55--- old/gcc/ipa-inline.c 2010-06-30 21:30:12 +0000
56+++ new/gcc/ipa-inline.c 2010-11-24 08:43:48 +0000
57@@ -1967,7 +1967,7 @@
58
59 /* Estimate the stack size for the function. But not at -O0
60 because estimated_stack_frame_size is a quadratic problem. */
61- self_stack_size = optimize ? estimated_stack_frame_size () : 0;
62+ self_stack_size = optimize ? estimated_stack_frame_size (node->decl) : 0;
63 inline_summary (node)->estimated_self_stack_size = self_stack_size;
64 node->global.estimated_stack_size = self_stack_size;
65 node->global.stack_frame_offset = 0;
66
67=== modified file 'gcc/tree-inline.h'
68--- old/gcc/tree-inline.h 2009-09-14 18:18:58 +0000
69+++ new/gcc/tree-inline.h 2010-11-24 08:43:48 +0000
70@@ -187,6 +187,6 @@
71 extern tree remap_type (tree type, copy_body_data *id);
72 extern gimple_seq copy_gimple_seq_and_replace_locals (gimple_seq seq);
73
74-extern HOST_WIDE_INT estimated_stack_frame_size (void);
75+extern HOST_WIDE_INT estimated_stack_frame_size (tree);
76
77 #endif /* GCC_TREE_INLINE_H */
78