diff options
author | Rafael Ávila de Espíndola <rafael.espindola@gmail.com> | 2015-04-17 11:51:36 -0400 |
---|---|---|
committer | Rafael Ávila de Espíndola <rafael.espindola@gmail.com> | 2015-04-17 11:51:36 -0400 |
commit | 4277535cdc6ce6998cdc273bbe454f9ca2c23037 (patch) | |
tree | c5205ed53cb26c0b0b76a9e756b84ef48165d7a8 /gold/gc.h | |
parent | a4ea36c6cb13d100aacab3a90762597cef471b35 (diff) | |
download | fsf-binutils-gdb-4277535cdc6ce6998cdc273bbe454f9ca2c23037.zip fsf-binutils-gdb-4277535cdc6ce6998cdc273bbe454f9ca2c23037.tar.gz fsf-binutils-gdb-4277535cdc6ce6998cdc273bbe454f9ca2c23037.tar.bz2 |
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.
Diffstat (limited to 'gold/gc.h')
-rw-r--r-- | gold/gc.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -23,7 +23,6 @@ #ifndef GOLD_GC_H #define GOLD_GC_H -#include <queue> #include <vector> #include "elfcpp.h" @@ -52,7 +51,7 @@ class Garbage_collection typedef Unordered_set<Section_id, Section_id_hash> Sections_reachable; typedef std::map<Section_id, Sections_reachable> Section_ref; - typedef std::queue<Section_id> Worklist_type; + typedef std::vector<Section_id> 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. |