This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 4/4] xtensa: replace action list with splay tree
- From: "augustine dot sterling at gmail dot com" <augustine dot sterling at gmail dot com>
- To: Max Filippov <jcmvbkbc at gmail dot com>
- Cc: binutils at sourceware dot org, David Weatherford <weath at cadence dot com>, Marc Gauthier <marc at cadence dot com>, "linux-xtensa at linux-xtensa dot org" <linux-xtensa at linux-xtensa dot org>
- Date: Thu, 9 Apr 2015 08:58:50 -0700
- Subject: Re: [PATCH 4/4] xtensa: replace action list with splay tree
- Authentication-results: sourceware.org; auth=none
- References: <1428590948-10787-1-git-send-email-jcmvbkbc at gmail dot com> <1428590948-10787-5-git-send-email-jcmvbkbc at gmail dot com>
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.