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/powerpc.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gold/powerpc.cc') diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 47bdc13..fddf3fa 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -238,7 +238,7 @@ public: if (this->opd_ent_[i].gc_mark) { unsigned int shndx = this->opd_ent_[i].shndx; - symtab->gc()->worklist().push(Section_id(this, shndx)); + symtab->gc()->worklist().push_back(Section_id(this, shndx)); } } @@ -6434,7 +6434,8 @@ Target_powerpc::do_gc_mark_symbol( if (ppc_object->opd_valid()) { unsigned int dst_indx = ppc_object->get_opd_ent(dst_off); - symtab->gc()->worklist().push(Section_id(ppc_object, dst_indx)); + symtab->gc()->worklist().push_back(Section_id(ppc_object, + dst_indx)); } else ppc_object->add_gc_mark(dst_off); -- cgit v1.1