mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Switch BBVectorize to directly depend on having a TTI analysis.
This could be simplified further, but Hal has a specific feature for ignoring TTI, and so I preserved that. Also, I needed to use it because a number of tests fail when switching from a null TTI to the NoTTI nonce implementation. That seems suspicious to me and so may be something that you need to look into Hal. I worked it by preserving the old behavior for these tests with the flag that ignores all target info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171722 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -199,8 +199,7 @@ namespace {
|
||||
DT = &P->getAnalysis<DominatorTree>();
|
||||
SE = &P->getAnalysis<ScalarEvolution>();
|
||||
TD = P->getAnalysisIfAvailable<DataLayout>();
|
||||
TTI = IgnoreTargetInfo ? 0 :
|
||||
P->getAnalysisIfAvailable<TargetTransformInfo>();
|
||||
TTI = IgnoreTargetInfo ? 0 : &P->getAnalysis<TargetTransformInfo>();
|
||||
}
|
||||
|
||||
typedef std::pair<Value *, Value *> ValuePair;
|
||||
@@ -424,8 +423,7 @@ namespace {
|
||||
DT = &getAnalysis<DominatorTree>();
|
||||
SE = &getAnalysis<ScalarEvolution>();
|
||||
TD = getAnalysisIfAvailable<DataLayout>();
|
||||
TTI = IgnoreTargetInfo ? 0 :
|
||||
getAnalysisIfAvailable<TargetTransformInfo>();
|
||||
TTI = IgnoreTargetInfo ? 0 : &getAnalysis<TargetTransformInfo>();
|
||||
|
||||
return vectorizeBB(BB);
|
||||
}
|
||||
@@ -435,6 +433,7 @@ namespace {
|
||||
AU.addRequired<AliasAnalysis>();
|
||||
AU.addRequired<DominatorTree>();
|
||||
AU.addRequired<ScalarEvolution>();
|
||||
AU.addRequired<TargetTransformInfo>();
|
||||
AU.addPreserved<AliasAnalysis>();
|
||||
AU.addPreserved<DominatorTree>();
|
||||
AU.addPreserved<ScalarEvolution>();
|
||||
@@ -3022,6 +3021,7 @@ char BBVectorize::ID = 0;
|
||||
static const char bb_vectorize_name[] = "Basic-Block Vectorization";
|
||||
INITIALIZE_PASS_BEGIN(BBVectorize, BBV_NAME, bb_vectorize_name, false, false)
|
||||
INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
|
||||
INITIALIZE_AG_DEPENDENCY(TargetTransformInfo)
|
||||
INITIALIZE_PASS_DEPENDENCY(DominatorTree)
|
||||
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
|
||||
INITIALIZE_PASS_END(BBVectorize, BBV_NAME, bb_vectorize_name, false, false)
|
||||
|
||||
Reference in New Issue
Block a user