diff options
author | Nadav Rotem <nrotem@apple.com> | 2012-12-12 01:11:46 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2012-12-12 01:11:46 +0000 |
commit | 5da804150d418b8b4956b84013f8f67df553c543 (patch) | |
tree | 5a923953dc1f5952501c9787ec0bad141227048f /lib/Transforms/Vectorize/LoopVectorize.h | |
parent | 61f4dfe3693bf68b20748d82ac4dd9bf2f356699 (diff) |
LoopVectorizer: When -Os is used, vectorize only loops that dont require a tail loop. There is no testcase because I dont know of a way to initialize the loop vectorizer pass without adding an additional hidden flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/LoopVectorize.h')
-rw-r--r-- | lib/Transforms/Vectorize/LoopVectorize.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.h b/lib/Transforms/Vectorize/LoopVectorize.h index 9d6d80e22b..e5a5259605 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.h +++ b/lib/Transforms/Vectorize/LoopVectorize.h @@ -420,10 +420,11 @@ public: const VectorTargetTransformInfo *Vtti): TheLoop(Lp), SE(Se), Legal(Leg), VTTI(Vtti) { } - /// Returns the most profitable vectorization factor for the loop that is - /// smaller or equal to the VF argument. This method checks every power - /// of two up to VF. - unsigned findBestVectorizationFactor(unsigned VF = MaxVectorSize); + /// Returns the most profitable vectorization factor in powers of two. + /// This method checks every power of two up to VF. If UserVF is not ZERO + /// then this vectorization factor will be selected if vectorization is + /// possible. + unsigned selectVectorizationFactor(bool OptForSize, unsigned UserVF); private: /// Returns the expected execution cost. The unit of the cost does |