This is the mail archive of the gcc-help@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: GIMPLE_OMP_FOR statements


Ok, thank you.
Then, is there any macro to know if a gimple statement is a FOR_STMT
like FOR_COND, or FOR_EXPR thats available for the cparser ? Basically
someway to know the lowered statements are within a for loop.

On Tue, May 5, 2009 at 10:51 AM, Ian Lance Taylor <iant@google.com> wrote:
> Tim Prince <TimothyPrince@sbcglobal.net> writes:
>
>> Aravinda wrote:
>>
>>> Since I dont know what OMP stands for, I was wondering if
>>> 'GIMPLE_OMP_FOR' statements represent the 'for loop' statements ?
>>> Also, can someone please tell me which is the latest pass where I will
>>> be able to notice the GIMPLE_OMP_FOR statements ?
>>
>> OMP stands for OpenMP, the widely used standard parallelization directives
>> for C, C++, and Fortran, implemented as libgomp for gcc.   So, OMP_FOR
>> would be an OpenMP parallel for loop.
>
> To answer the other half of your question, in C/C++ for loops are not
> represented in GIMPLE at all.  The C parser converts them directly into
> goto statements.  The C++ parser generates FOR_STMT nodes in the
> frontend, and converts them to goto statements when converting to
> GIMPLE.
>
> Ian
>


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