This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [59/77] Add a rtx_jump_table_data::get_data_mode helper
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Thu, 24 Aug 2017 15:35:03 -0600
- Subject: Re: [59/77] Add a rtx_jump_table_data::get_data_mode helper
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5D7E3356F2
- References: <8760ewohsv.fsf@linaro.org> <8737a0emq7.fsf@linaro.org>
On 07/13/2017 02:59 AM, Richard Sandiford wrote:
> This patch adds a helper function to get the mode of the addresses
> or offsets in a jump table. It also changes the final.c code to use
> rtx_jump_table_data over rtx or rtx_insn in cases where it needed
> to use the new helper. This in turn meant adding a safe_dyn_cast
> equivalent of safe_as_a, to cope with null NEXT_INSNs.
>
> 2017-07-13 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayward <alan.hayward@arm.com>
> David Sherwood <david.sherwood@arm.com>
>
> gcc/
> * is-a.h (safe_dyn_cast): New function.
> * rtl.h (rtx_jump_table_data::get_data_mode): New function.
> (jump_table_for_label): Likewise.
> * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
> instead of an rtx_insn *.
> (shorten_branches): Use dyn_cast instead of LABEL_P and
> JUMP_TABLE_DATA_P. Use jump_table_for_label and
> rtx_jump_table_data::get_data_mode.
> (final_scan_insn): Likewise.
OK.
jeff
>