This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Implement #pragma unroll?
- From: "Bingfeng Mei" <bmei at broadcom dot com>
- To: "Alex Turjan" <aturjan at yahoo dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 29 May 2008 15:45:53 -0700
- Subject: RE: Implement #pragma unroll?
- References: <493927.18450.qm@web62410.mail.re1.yahoo.com>
Alex, Thanks for your suggestion. What target hook do you use for the
backend function?
-----Original Message-----
From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of
Alex Turjan
Sent: 29 May 2008 14:45
To: gcc@gcc.gnu.org
Subject: RE: Implement #pragma unroll?
Dear Bingfeng,
Some time ago I had to deal with a similar issue as
you. Basically I did as follows: I built a backend
function which catches the unroll pragma and replaces
it with a target assembly intrinsic (which of course
has to be described in an .md file). After that in the
RTL unroll phase, I analyze loop by loop and connect
them to the corresponding unrolling intrinsic (which
as a field contains the unrolling factor, you may add
here extra information which allows you to recognize
the loop) from where I decide the unrolling factor.
After that in the RTL unroll phase I remove all the
unroll intrinsics.
hope this will help,
Alex