forked from OSchip/llvm-project
parent
a18228a95f
commit
9694ab8ffa
|
|
@ -1186,14 +1186,13 @@ bool LoopVectorizationLegality::canVectorizeMemory(BasicBlock &BB) {
|
||||||
/// marked with the NoAlias attribute.
|
/// marked with the NoAlias attribute.
|
||||||
bool LoopVectorizationLegality::isIdentifiedSafeObject(Value* Val) {
|
bool LoopVectorizationLegality::isIdentifiedSafeObject(Value* Val) {
|
||||||
assert(Val && "Invalid value");
|
assert(Val && "Invalid value");
|
||||||
if (dyn_cast<GlobalValue>(Val))
|
if (isa<GlobalValue>(Val))
|
||||||
return true;
|
return true;
|
||||||
if (dyn_cast<AllocaInst>(Val))
|
if (isa<AllocaInst>(Val))
|
||||||
return true;
|
return true;
|
||||||
Argument *A = dyn_cast<Argument>(Val);
|
if (Argument *A = dyn_cast<Argument>(Val))
|
||||||
if (!A)
|
return A->hasNoAliasAttr();
|
||||||
return false;
|
return false;
|
||||||
return A->hasNoAliasAttr();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LoopVectorizationLegality::AddReductionVar(PHINode *Phi,
|
bool LoopVectorizationLegality::AddReductionVar(PHINode *Phi,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue