aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-10-16 11:02:33 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2011-10-16 09:02:33 +0000
commit1bb7e8f8fe35140b62b0d203f04c3d9f1c5ee909 (patch)
tree73c46c47c625cb820a322e1f5c4329144fe3d480 /gcc/cgraphunit.c
parent7a2a89e864c42313b9180d13088b7c57baa68fad (diff)
downloadgcc-1bb7e8f8fe35140b62b0d203f04c3d9f1c5ee909.zip
gcc-1bb7e8f8fe35140b62b0d203f04c3d9f1c5ee909.tar.gz
gcc-1bb7e8f8fe35140b62b0d203f04c3d9f1c5ee909.tar.bz2
re PR middle-end/48668 (COMDAT Group signature not emitted in group)
PR target/48668 PR target/50689 * cgraphunit.c (cgraph_expand_function): Expand thunks and alises after function body. From-SVN: r180053
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index c75c130..96c910c 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1798,7 +1798,6 @@ cgraph_expand_function (struct cgraph_node *node)
announce_function (decl);
node->process = 0;
- assemble_thunks_and_aliases (node);
gcc_assert (node->lowered);
/* Generate RTL for the body of DECL. */
@@ -1808,6 +1807,14 @@ cgraph_expand_function (struct cgraph_node *node)
gcc_assert (TREE_ASM_WRITTEN (decl));
current_function_decl = NULL;
gcc_assert (!cgraph_preserve_function_body_p (node));
+
+ /* It would make a lot more sense to output thunks before function body to get more
+ forward and lest backwarding jumps. This is however would need solving problem
+ with comdats. See PR48668. Also aliases must come after function itself to
+ make one pass assemblers, like one on AIX happy. See PR 50689.
+ FIXME: Perhaps thunks should be move before function IFF they are not in comdat
+ groups. */
+ assemble_thunks_and_aliases (node);
cgraph_release_function_body (node);
/* Eliminate all call edges. This is important so the GIMPLE_CALL no longer
points to the dead function body. */