4

XCode 5 has an option to turn on auto-vectorisation in the Apple LLVM 5.0 compiler. But how can I tell whether a given loop has been vectorised successfully?

Using gcc from the command line, I could set the -ftree-vectorizer-verbose flag and get some (admittedly annoyingly cryptic) messages whenever a loop failed to vectorise, but using this new XCode option my code just compiles with "no issues", and I can't tell whether my loops have been vectorised or not.

Of course I could profile to see if there's a speed difference, but really my concern is with knowing that any given inner loop hasn't been vectorised, so that I can try to change it to something that will be.

So is there a way within XCode to set LLVM's verbosity to a level where it will report on vectorisation, or is there some other way to get XCode to tell me when a loop hasn't been vectorised, and what the reason is if it hasn't?

I'm compiling C++ for OS X in case that makes a difference.

N. Virgo
  • 7,970
  • 11
  • 44
  • 65
  • 1
    Answered in http://stackoverflow.com/questions/19890237/is-there-a-way-to-show-where-llvm-is-auto-vectorising/22260899#22260899 – scztt Mar 07 '14 at 21:22

0 Answers0