mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-18 14:31:27 +00:00
Add an option -vectorize-slp-aggressive for running the BB vectorizer. Make -fslp-vectorize run the slp-vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179508 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8849838965
commit
1129a832e6
@ -103,6 +103,7 @@ public:
|
|||||||
bool DisableSimplifyLibCalls;
|
bool DisableSimplifyLibCalls;
|
||||||
bool DisableUnitAtATime;
|
bool DisableUnitAtATime;
|
||||||
bool DisableUnrollLoops;
|
bool DisableUnrollLoops;
|
||||||
|
bool BBVectorize;
|
||||||
bool SLPVectorize;
|
bool SLPVectorize;
|
||||||
bool LoopVectorize;
|
bool LoopVectorize;
|
||||||
|
|
||||||
|
@ -33,7 +33,12 @@ RunLoopVectorization("vectorize-loops",
|
|||||||
cl::desc("Run the Loop vectorization passes"));
|
cl::desc("Run the Loop vectorization passes"));
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
RunSLPVectorization("vectorize-slp", cl::desc("Run the SLP vectorization passes"));
|
RunSLPVectorization("vectorize-slp",
|
||||||
|
cl::desc("Run the SLP vectorization passes"));
|
||||||
|
|
||||||
|
static cl::opt<bool>
|
||||||
|
RunBBVectorization("vectorize-slp-aggressive",
|
||||||
|
cl::desc("Run the BB vectorization passes"));
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
UseGVNAfterVectorization("use-gvn-after-vectorization",
|
UseGVNAfterVectorization("use-gvn-after-vectorization",
|
||||||
@ -52,6 +57,7 @@ PassManagerBuilder::PassManagerBuilder() {
|
|||||||
DisableSimplifyLibCalls = false;
|
DisableSimplifyLibCalls = false;
|
||||||
DisableUnitAtATime = false;
|
DisableUnitAtATime = false;
|
||||||
DisableUnrollLoops = false;
|
DisableUnrollLoops = false;
|
||||||
|
BBVectorize = RunBBVectorization;
|
||||||
SLPVectorize = RunSLPVectorization;
|
SLPVectorize = RunSLPVectorization;
|
||||||
LoopVectorize = RunLoopVectorization;
|
LoopVectorize = RunLoopVectorization;
|
||||||
}
|
}
|
||||||
@ -208,6 +214,11 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
|
|||||||
addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
|
addExtensionsToPM(EP_ScalarOptimizerLate, MPM);
|
||||||
|
|
||||||
if (SLPVectorize) {
|
if (SLPVectorize) {
|
||||||
|
MPM.add(createSLPVectorizerPass());
|
||||||
|
MPM.add(createEarlyCSEPass());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BBVectorize) {
|
||||||
MPM.add(createBBVectorizePass());
|
MPM.add(createBBVectorizePass());
|
||||||
MPM.add(createInstructionCombiningPass());
|
MPM.add(createInstructionCombiningPass());
|
||||||
if (OptLevel > 1 && UseGVNAfterVectorization)
|
if (OptLevel > 1 && UseGVNAfterVectorization)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user