On 3/21/12 3:30 PM, Steven Bosscher wrote:

+/* FIXME: Trunk is at GCC 4.8 now and the above problem still hasn't been
+   addressed properly.  This caused PR 52640 due to O(external_decls**2)
+   lookups in the pending_assemble_externals queue in assemble_external.
+   Paper over with this pointer set.  (And pending_assemble_externals even
+   was a TREE_LIST before?!)  */
+static struct pointer_set_t *pending_assemble_externals_set;

Can you add some description on what this pointer set does?

 /* True if DECL is a function decl for which no out-of-line copy exists.
    It is assumed that DECL's assembler name has been set.  */
@@ -2146,11 +2153,14 @@ void
 process_pending_assemble_externals (void)
-  tree list;
-  for (list = pending_assemble_externals; list; list = TREE_CHAIN (list))
-    assemble_external_real (TREE_VALUE (list));
+  size_t i;
+  tree decl;

-  pending_assemble_externals = 0;
+  FOR_EACH_VEC_ELT (tree, pending_assemble_externals, i, decl)
+    assemble_external_real (decl);
+  VEC_free (tree, gc, pending_assemble_externals);

Just pending_assemble_externals = NULL;

OK for all release branches (if they are open for fixes).


Reply via email to