hope there is someone from the intel ifort compiler team being able to answer my somehow strange questions ;-) .
I have a Fortran90 Code that should be vectorized in some specific place in one object file (this part of the code is indicated by hotspot analysis as the most promising code part with regard to any form of optimization).
So, I was advised to apply some vector optimzation (SSE or AVX) within a limited scope of the source code of one file.
But, as the relevant code snippets do not contain any for, do or while constructs, I wonder how to accomplish this taks
in an efficient and straightforward manner.
All examples well suited for vectorization (reading through forum posts, intel compiler docu and tutorials) do only
present examples with do, for or while constructs (in C/C++ resp. Fortran language).
The auto-vectorization facility of the ifort compiler is doing some vectorization optimization in two places (indicated
by the vec-report messages). I receive the message reading "BLOCK WAS VECTORIZED" .
In two other places the compiler annonces that no profitable vectorization of a loop construct wouldn't/shouldn't be possible. Eitherway, I can force the compiler to also vectorize these probable loops.
By vectorizing these parts of the code, again the message "BLOCK WAS VECTORIZED" is printed.
And here are my questions:
1) I wonder if the ifort compiler is anyhow able to (efficiently) vectorize any other code constructs related to arrays or
contigous data blocks with static/variable(?) sizes of the data blocks that are not covered by loop constructs? (I am not very familiar with this sort of stuff ;-) )
If so, how do these prototypes of constructs look like?
2) Am I right supposing a compiler is only able to vectorize loops resp. constructs if the extent of all array indices is
known at compile time and if all indices do not depend on each other?
3) Is it possible to determine the exent of blocks vectorized by the compiler without snooping around in the assembler code of the program?
Or, how can I instruct the compiler to tell me about the exent of blocks vectorized (the compiler only tells me about the
start source code line, but unfortunately doesn't inform me about the end of of a block resp. of the extent (in lines) of the block being vectorized :-( ) ?
4) Why does the compiler tells me about a loop being inefficent with respect to vectorization while doing no optimization,
whereas he tells me about a block being vectorized while forcing the compiler to vectorize all vectroizable constructs in
the object file?
Thanks in advance taking some time reading through all this stuff and my questions. ;-)