This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/4] xtensa: replace action list with splay tree


On Thu, Apr 9, 2015 at 7:49 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> 2015-04-03  Max Filippov  <jcmvbkbc@gmail.com>
> bfd/
>         * elf32-xtensa.c (splay-tree.h): include header.
>         (text_action_struct): drop next pointer.
>         (text_action_list_struct): drop head pointer, add count and
>         tree fields.
>         (find_fill_action): instead of linear search in text_action_list
>         search in the tree.
>         (text_action_compare, action_first, action_next): new functions.
>         (text_action_add, text_action_add_literal): instead of linear
>         search and insertion insert new node into the tree.
>         (removed_by_actions): pass additional parameter: action_list,
>         use it to traverse the tree.
>         (offset_with_removed_text): pass additional action_list parameter
>         to removed_by_actions.
>         (map_action_fn_context): new typedef.
>         (map_action_fn_context_struct): new structure.
>         (map_action_fn): new function.
>         (map_removal_by_action): use splay_tree_foreach to build map.
>         (find_insn_action): replace linear search in text_action_list
>         with series of splay_tree_lookups.
>         (print_action, print_action_list_fn): new functions.
>         (print_action_list): use splay_tree_foreach.
>         (init_xtensa_relax_info): drop action_list.head initialization.
>         Initialize the tree.
>         (compute_text_actions): use non-zero action_list_count instead of
>         non-NULL action list.
>         (xlate_map_context): new typedef.
>         (xlate_map_context_struct): new structure.
>         (xlate_map_fn): new function.
>         (build_xlate_map): use splay_tree_foreach to build map.
>         (action_remove_bytes_fn): new function.
>         (relax_section): use zero action_list_count instead of NULL
>         action list. Use splay_tree_foreach to count final section size.
>         Drop unused variable 'removed'.

Approved. Please apply.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]