diff options
author | Florian Hahn <flo@fhahn.com> | 2019-03-28 10:37:12 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2019-03-28 10:37:12 +0000 |
commit | e21ed594d8ab9decec31a13cf791579e2ded682c (patch) | |
tree | 5df12ebebb3a725fe387ddcb4f5bae649d06690b /llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h | |
parent | 22be913ac00bd220af46f7e1f4f5ea59027c0b11 (diff) | |
download | bcm5719-llvm-e21ed594d8ab9decec31a13cf791579e2ded682c.tar.gz bcm5719-llvm-e21ed594d8ab9decec31a13cf791579e2ded682c.zip |
[VPlan] Determine Vector Width programmatically.
With this change, the VPlan native path is triggered with the directive:
#pragma clang loop vectorize(enable)
There is no need to specify the vectorize_width(N) clause.
Patch by Francesco Petrogalli <francesco.petrogalli@arm.com>
Differential Revision: https://reviews.llvm.org/D57598
llvm-svn: 357156
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h index 7264eb97e1b..8b7cf300eef 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h +++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h @@ -174,6 +174,10 @@ struct VectorizationFactor { // Width 1 means no vectorization, cost 0 means uncomputed cost. static VectorizationFactor Disabled() { return {1, 0}; } + + bool operator==(const VectorizationFactor &rhs) const { + return Width == rhs.Width && Cost == rhs.Cost; + } }; /// Planner drives the vectorization process after having passed |