Compiler flags

Compiler flags

Dear all,

I am looking for flag option that used to generate intermediate representation of OpenMP* on icc, such as explain in (1.7.1 Work Sharing Example).

Also, is it possible to extend  icc compiler by adding new pragma (directive)?

Thanks in adavnce

Regards

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

Current production icc compilers don't have the ability to dump intermediate code representation.

I am not clear what are you asking in the second question.  Of cause the compiler implements new pragmas once the need arises, so it is obviously possible.  If you want to see some particular pragma implemented, you can submit feature request via official compiler support channel.  It is then up to compiler developers to fulfil your request.

Regards,
Andrey

 

Dear Andrey,

Thanks for your response. 

OpenMP* is open source, right?

I would like to develop its run-time. Could you please give me advice, how can I know the implementation of OpenMP* pragma on MIC?

Thanks 

Hi,

You can output assembler dump and see what code is generated for OpenMP pragmas, e.g.

 $ icc -openmp -S -fsource-asm <source_file.c>

It is not so readable like the schematic example in documentation, but shows exact code generation.  If you are not familiar with MIC assembler, then you can look at native Linux code that is essentially the same related to OpenMP pragmas.

Regards,
Andrey

Hi,

Thanks.

This way is a very tiring and not guaranteed.

 

If you want to read and modify the internals of an OpenMP compiler, you would likely be better working with the LLVM Clang OpenMP compiler. The code hasn't yet been promoted into the LLVM mainline, but is all available from http://clang-omp.github.io/. It uses the same runtime, and there are doubtless ways to dump LLVM IR.

Dear James,

Thanks for your response.

I know about the LLVM progress, but I am interested more in GCC compiler and have experience on it . Unfortunately, gcc is not supported on MIC.

Therefore, I was thinking to extend icc compiler with OpenMP* to study the performance of my implementation. 

Also, I don't like to use source-to-source compiler to support my model.

Thanks

@James,

Best my acknowledge, LLVM also not supported on MIC?

OK, so you want MIC stuff, if you look back through your questions, you'll see that you didn't actually mention that before !

"Unfortunately, gcc is not supported on MIC." Wrong: there is a gcc for MIC see http://software.intel.com/en-us/articles/intel-and-third-party-tools-and... however depending on all your other (so far unstated :-) requirements, it may not be interesting since I don't think it supports any vectorization.

"Also, I don't like to use source-to-source compiler to support my model." LLVM isn't a source to source translator, so this comment seems irrelevant.

First off, thanks.

>>OK, so you want MIC stuff, if you look back through your questions, you'll see that you didn't actually mention that before !

Sorry, I did here "Could you please give me advice, how can I know the implementation of OpenMP* pragma on MIC?"

>>Wrong: there is a gcc for MIC see http://software.intel.com/en-us/articles/intel-and-third-party-tools-and... however depending on all your other (so far >>unstated :-) requirements, it may not be interesting since I don't think it supports any vectorization.

Namely, I can compile some OpenMP code by gcc (which version?) and generate binary (foo.mic) that using in native execution on MIC?

>>"Also, I don't like to use source-to-source compiler to support my model." LLVM isn't a source to source translator, so this comment seems irrelevant.

Sorry, I was not clear here. I know the LLVM isn't S-to-S compiler, I meant the other way like using S-t-S to generate file.c and recompile agin by icc (to generate .mic).

Leave a Comment

Please sign in to add a comment. Not a member? Join today