This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 



      


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]