diff options
author | Martin Liska <mliska@suse.cz> | 2020-02-05 09:56:31 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-02-05 09:56:31 +0100 |
commit | 27736735f6fcba464b90c3a9dff13b7e5c8bdc6e (patch) | |
tree | ce9e6d8b5479ef66bc5fc41ecc9da6eb5d5ca8a3 /gcc/lto | |
parent | f4239581925d6a9fba049f8f771e909a7a5e5ce7 (diff) | |
download | gcc-27736735f6fcba464b90c3a9dff13b7e5c8bdc6e.zip gcc-27736735f6fcba464b90c3a9dff13b7e5c8bdc6e.tar.gz gcc-27736735f6fcba464b90c3a9dff13b7e5c8bdc6e.tar.bz2 |
Do not load body for alias symbols.
PR lto/93489
* lto-dump.c (dump_list_functions): Do not
load body for aliases.
(dump_body): Likewise here.
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/lto/lto-dump.c | 22 |
2 files changed, 19 insertions, 10 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 2b930cb..1e5bab6 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2020-02-05 Martin Liska <mliska@suse.cz> + + PR lto/93489 + * lto-dump.c (dump_list_functions): Do not + load body for aliases. + (dump_body): Likewise here. + 2020-01-16 Martin Liska <mliska@suse.cz> * lto-partition.c (lto_balanced_map): Remember diff --git a/gcc/lto/lto-dump.c b/gcc/lto/lto-dump.c index 2983c22..96e26d9 100644 --- a/gcc/lto/lto-dump.c +++ b/gcc/lto/lto-dump.c @@ -122,7 +122,7 @@ public: cgraph_node *cnode = dyn_cast<cgraph_node *> (node); gcc_assert (cnode); - return (cnode->definition) + return (cnode->definition && !cnode->alias) ? n_basic_blocks_for_fn (DECL_STRUCT_FUNCTION (cnode->decl)) : 0; } @@ -157,10 +157,10 @@ void dump_list_functions (void) cgraph_node *cnode; FOR_EACH_FUNCTION (cnode) { - if (cnode->definition) + if (cnode->definition && !cnode->alias) cnode->get_untransformed_body (); symbol_entry *e = new function_entry (cnode); - if (!flag_lto_dump_defined || cnode->definition) + if (!flag_lto_dump_defined || (cnode->definition && !cnode->alias)) v.safe_push (e); } @@ -260,13 +260,15 @@ void dump_body () } cgraph_node *cnode; FOR_EACH_FUNCTION (cnode) - if (cnode->definition && !strcmp (cnode->name (), flag_dump_body)) - { - printf ("Gimple Body of Function: %s\n", cnode->name ()); - cnode->get_untransformed_body (); - debug_function (cnode->decl, flags); - flag = 1; - } + if (cnode->definition + && !cnode->alias + && !strcmp (cnode->name (), flag_dump_body)) + { + printf ("Gimple Body of Function: %s\n", cnode->name ()); + cnode->get_untransformed_body (); + debug_function (cnode->decl, flags); + flag = 1; + } if (!flag) error_at (input_location, "Function not found."); return; |