From 4277535cdc6ce6998cdc273bbe454f9ca2c23037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Fri, 17 Apr 2015 11:51:36 -0400 Subject: Use LIFO instead of FIFO to implement gc's transitive closure. FIFO is harder to implement and has less locality than LIFO. It is also not necessary to implement a transitive closure, a LIFO works just as well. --- gold/gc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gold/gc.h') diff --git a/gold/gc.h b/gold/gc.h index be4a63c5c22..bf4023dcae7 100644 --- a/gold/gc.h +++ b/gold/gc.h @@ -23,7 +23,6 @@ #ifndef GOLD_GC_H #define GOLD_GC_H -#include #include #include "elfcpp.h" @@ -52,7 +51,7 @@ class Garbage_collection typedef Unordered_set Sections_reachable; typedef std::map Section_ref; - typedef std::queue Worklist_type; + typedef std::vector Worklist_type; // This maps the name of the section which can be represented as a C // identifier (cident) to the list of sections that have that name. // Different object files can have cident sections with the same name. -- cgit v1.2.1