mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Move the max vector width to a constant parameter. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168570 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
00e8074ee2
commit
6bfc3481bd
@ -86,6 +86,9 @@ const unsigned TinyTripCountThreshold = 16;
|
||||
/// number of pointers. Notice that the check is quadratic!
|
||||
const unsigned RuntimeMemoryCheckThreshold = 2;
|
||||
|
||||
/// This is the highest vector width that we try to generate.
|
||||
const unsigned MaxVectorSize = 8;
|
||||
|
||||
namespace {
|
||||
|
||||
// Forward declarations.
|
||||
@ -400,7 +403,7 @@ public:
|
||||
/// 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 = 8);
|
||||
unsigned findBestVectorizationFactor(unsigned VF = MaxVectorSize);
|
||||
|
||||
private:
|
||||
/// Returns the expected execution cost. The unit of the cost does
|
||||
@ -859,10 +862,9 @@ SingleBlockLoopVectorizer::createEmptyLoop(LoopVectorizationLegality *Legal) {
|
||||
Value *MemoryRuntimeCheck = addRuntimeCheck(Legal, Loc);
|
||||
|
||||
// If we are using memory runtime checks, include them in.
|
||||
if (MemoryRuntimeCheck) {
|
||||
if (MemoryRuntimeCheck)
|
||||
Cmp = BinaryOperator::Create(Instruction::Or, Cmp, MemoryRuntimeCheck,
|
||||
"CntOrMem", Loc);
|
||||
}
|
||||
|
||||
BranchInst::Create(MiddleBlock, VectorPH, Cmp, Loc);
|
||||
// Remove the old terminator.
|
||||
|
Loading…
x
Reference in New Issue
Block a user