aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-07-30 09:24:40 +0200
committerMartin Liska <mliska@suse.cz>2020-07-31 12:14:38 +0200
commit8bd062e8ad44e70be04108232e1ef597fc3b3e3e (patch)
treea5e39e75e1fd5eea596c71dbbebf2f74fd4a2bf4 /gcc/cgraph.h
parent10231958fcfb13bc4847729eba21470c101b4a88 (diff)
downloadgcc-8bd062e8ad44e70be04108232e1ef597fc3b3e3e.zip
gcc-8bd062e8ad44e70be04108232e1ef597fc3b3e3e.tar.gz
gcc-8bd062e8ad44e70be04108232e1ef597fc3b3e3e.tar.bz2
Do not allocate huge array in output_in_order.
We noticed that when analyzing LTRANS memory peak that happens right after the start: https://gist.github.com/marxin/223890df4d8d8e490b6b2918b77dacad In case of chrome, we have symtab->order == 200M, so we allocate 16B * 200M = 3.2GB. gcc/ChangeLog: * cgraph.h: Remove leading empty lines. * cgraphunit.c (enum cgraph_order_sort_kind): Remove ORDER_UNDEFINED. (struct cgraph_order_sort): Add constructors. (cgraph_order_sort::process): New. (cgraph_order_cmp): New. (output_in_order): Simplify and push nodes to vector.
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index cfae6e9..0211f08 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -2171,8 +2171,6 @@ private:
/* Every top level asm statement is put into a asm_node. */
struct GTY(()) asm_node {
-
-
/* Next asm node. */
asm_node *next;
/* String for this asm node. */