Repeating remarks in diagnostics of loop vectorization

Hi,

Can anyone tell me why remarks are repeated while using diagnostics flags like -Rpass-missed=loop-vectorize and -Rpass=loop-vectorize?

And sometimes the remarks don’t seem to be in the proper order (e.g diagnosis of line 230 is printed before 210 and then 230 is printed again).

Is this expected behaviour? I’m building and testing using the lnt tool.

Also I’m building with single thread to avoid multiple threads writing simultaneously.

Sorry if this stuff is trivial.

Thanks
Krishna Chaitanya

The diagnostics print loops from the perspective of the vectorizer, in the order the vectorizer sees them. They could appear to repeat if the loop is cloned for some reason. For example, if you write a loop in an function that gets inlined, each inline copy is considered a separate loop.

There's probably room for improvement here; the vectorizer could print more information about each loop.

-Eli