]> granicus.if.org Git - clang/commit
Move logic to enable the vectorizer to clang
authorArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 13 Aug 2013 15:46:23 +0000 (15:46 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 13 Aug 2013 15:46:23 +0000 (15:46 +0000)
commit99662a156055de9f46b3cababbf7032e68ed961b
treea4eb9c54cb3ad1e322ddeb26ddac154f5fb5b27e
parent9d02807c3ea9782442b98201df68294cd7cd7313
Move logic to enable the vectorizer to clang

We used to decide whether to really vectorize depending on the optimization
level in PassManagerBuilder.

This patch moves this decision to the clang driver. We look at the optimization
level and whether the f(no-)vectorize is set and decide whether to vectorize.

This allows us to simplify the logic in PassManagerBuilder to just a check for
whether the vectorizer should run or not.

We now do the right thing for:
$ clang -O1 -fvectorize
$ clang -fno-vectorize -O3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188280 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Tools.cpp
test/Driver/clang_f_opts.c