optimization remarks

Hi,

I am trying to compare the loop vectorizers effectiveness for different targets relative to each other. That way, I am hoping to find loops that are not vectorized - but could be - on my target by finding other targets doing this successfully. With some luck, there might be something in the Target files that could be fixed with improved vectorization as a result...

I would like to do this with the optimization remarks enabled: -Rpass=loop-vectorize, etc. Since cross-compiling benchmarks seems tricky to me at the moment, my idea was to first run the front end, and then run the optimizers for different targets. However, when I pass -save-temps to clang there are no remarks emitted at all any more... So in effect I can only get the remarks for the target I am on :-/

I wonder if there is a reason for this, or if it's something that could be fixed?

/Jonas

I think it's just a bug; if you pass -### to clang, you can see how -save-temps actually invokes clang four times, and -Rpass only gets passed to the first invocation.

-Eli

Hi Eli,

Strange - I see -Rpass in all the invocations… It just doesn’t seem to have any effect with -save-temps… Am I doing something wrong?

I don’t think so. I ran into this a couple of weeks ago myself, and then forgot to file a bug report. -Hal