Implement #pragma unroll?
Alex Turjan
aturjan@yahoo.com
Thu May 29 13:45:00 GMT 2008
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
More information about the Gcc
mailing list