[LV] Scalar Epilogue Lowering. NFC.
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 25 Jul 2019 08:06:02 +0000 (08:06 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 25 Jul 2019 08:06:02 +0000 (08:06 +0000)
commit5c606cef796ebcd9165719955fe46fa1ace2d124
treee7dc1da45fc145a1c13f969235d2bcd06d06095e
parent85d2fe786198e66de9dd80f0db48d1942ade146f
[LV] Scalar Epilogue Lowering. NFC.

This refactors boolean 'OptForSize' that was passed around in a lot of places.
It controlled folding of the tail loop, the scalar epilogue, into the main loop
but code-size reasons may not be the only reason to do this. Thus, this is a
first step to generalise the concept of tail-loop folding, and hence OptForSize
has been renamed and is using an enum ScalarEpilogueStatus that holds the
status how the epilogue should be lowered.

This will be followed up by D65197, that picks up the predicate loop hint and
performs the tail-loop folding.

Differential Revision: https://reviews.llvm.org/D64916

llvm-svn: 366993
llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp