This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Denis Chertykov <chertykov at gmail dot com>
- Date: Thu, 27 Jul 2017 14:29:00 +0200
- Subject: [patch 0/2] PR49847: Add hook to place read-only lookup-tables in named address-space
- Authentication-results: sourceware.org; auth=none
For some targets, the best place to put read-only lookup tables as
generated by -ftree-switch-conversion is not the generic address space
but some target specific address space.
This is the case for AVR, where for most devices .rodata must be
located in RAM.
Part #1 adds a new, optional target hook that queries the back-end
about the desired address space. There is currently only one user:
tree-switch-conversion.c::build_one_array() which re-builds value_type
and array_type if the address space returned by the backend is not
the generic one.
Part #2 is the AVR part that implements the new hook and adds some
sugar around it.