This is the mail archive of the
mailing list for the GCC project.
Re: how to modify gcc to compile a[b] differently
- From: Gry Gunvor <gry dot gunvor at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Wed, 1 Apr 2015 09:57:27 -0700
- Subject: Re: how to modify gcc to compile a[b] differently
- Authentication-results: sourceware.org; auth=none
- References: <CA+mdN-FB_1w6NJtQpWZ-jycsS-n6qoo=FAo_z+9cATcE7QQv9A at mail dot gmail dot com> <CAFiYyc2CoV3=2CvdS8cnMo5VeqzA0LZxV6DXibT45t6sre3HTA at mail dot gmail dot com>
The documentation I find online for modifying gcc is rather old. Is
there an up to date map of at least where in gcc the different stages
Suppose I just want to modify the instruction emitted for the "*"
operator. Where is that?
On Wed, Apr 1, 2015 at 2:19 AM, Richard Biener
> On Wed, Apr 1, 2015 at 12:20 AM, Gry Gunvor <email@example.com> wrote:
>> I want to modify gcc 4.9.2 so that array subscripting expressions a[b]
>> generate a new instruction/syscall foo(a, b) (that is, taking a and b
>> as arguments) rather than just being turned into *(a+b).
>> Further, I want accesses into multi-dimensional arrays a[b][c] to turn
>> into foo(a, (b * row_size + c)) rather than *(a + b * row_size + c).
>> Any help finding a simple and robust way to do this would be greatly
> You probably want to do this in the frontends.