aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2011-10-04 14:12:37 +0000
committerAndi Kleen <ak@gcc.gnu.org>2011-10-04 14:12:37 +0000
commitc17d253c7ac235322caca8248f34a9e83919714d (patch)
tree8e13f5db02816ade11570d10b3d459b2c9b7e71d /gcc/builtins.c
parent0d9bbe5476d3b2bb2815c8b3ec77fae607243511 (diff)
downloadgcc-c17d253c7ac235322caca8248f34a9e83919714d.zip
gcc-c17d253c7ac235322caca8248f34a9e83919714d.tar.gz
gcc-c17d253c7ac235322caca8248f34a9e83919714d.tar.bz2
Maintain order of LTO sections
Currently when reading in LTO sections from ld -r files they can get randomly reordered based on hash tables and random IDs. This causes reordering later when the final code is generated and also makes crashes harder to reproduce. This patch maintains explicit lists based on the input order and uses those lists to preserve that order when starting the rest of the LTO passes. This is the first step to working -fno-toplevel-reorder for LTO. But this needs more changes because the LTO partitioner can still reorder. This add two lists: one for the section and another one for the file_decl_datas. This is needed because the sections are walked twice through different data structures. In addition some code becomes slightly cleaner because we don't need to pass state through abstract callbacks anymore, but can just use direct type safe calls. gcc/lto/: 2011-10-02 Andi Kleen <ak@linux.intel.com> * lto-object.c (lto_obj_add_section_data): Add list. (lto_obj_add_section): Fill in list. (ltoobj_build_section_table): Pass through list. * lto.c (file_data_list): Declare. (create_subid_section_table): Pass arguments directly. Fill in list of file_datas. (lwstate): Delete. (lto_create_files_from_ids): Pass in direct arguments. Don't maintain list. (lto_file_read): Use explicit section and file data lists. (lto_read_all_file_options): Pass in section_list. * lto.h (lto_obj_build_section_table): Add list. (lto_section_slot): Add next. (lto_section_list): Declare. From-SVN: r179505
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions