mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-11 21:38:19 +00:00
[LoopAccesses] Make blockNeedsPredication static
blockNeedsPredication is in LoopAccess in order to share it with the vectorizer. It's a utility needed by LoopAccess not strictly provided by it but it's a good place to share it. This makes the function static so that it no longer required to create an LoopAccessInfo instance in order to access it from LV. This was actually causing problems because it would have required creating LAI much earlier that LV::canVectorizeMemory(). This is part of the patchset that converts LoopAccessAnalysis into an actual analysis pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -554,7 +554,7 @@ public:
|
||||
AliasAnalysis *AA, Function *F,
|
||||
const TargetTransformInfo *TTI)
|
||||
: NumPredStores(0), TheLoop(L), SE(SE), DL(DL),
|
||||
TLI(TLI), TheFunction(F), TTI(TTI), Induction(nullptr),
|
||||
TLI(TLI), TheFunction(F), TTI(TTI), DT(DT), Induction(nullptr),
|
||||
WidestIndTy(nullptr),
|
||||
LAI(L, SE, DL, TLI, AA, DT),
|
||||
HasFunNoNaNAttr(false) {}
|
||||
@ -855,6 +855,8 @@ private:
|
||||
Function *TheFunction;
|
||||
/// Target Transform Info
|
||||
const TargetTransformInfo *TTI;
|
||||
/// Dominator Tree.
|
||||
DominatorTree *DT;
|
||||
|
||||
// --- vectorization state --- //
|
||||
|
||||
@ -4173,7 +4175,7 @@ bool LoopVectorizationLegality::isInductionVariable(const Value *V) {
|
||||
}
|
||||
|
||||
bool LoopVectorizationLegality::blockNeedsPredication(BasicBlock *BB) {
|
||||
return LAI.blockNeedsPredication(BB);
|
||||
return LoopAccessInfo::blockNeedsPredication(BB, TheLoop, DT);
|
||||
}
|
||||
|
||||
bool LoopVectorizationLegality::blockCanBePredicated(BasicBlock *BB,
|
||||
|
Reference in New Issue
Block a user