Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Analysis/ScalarEvolution.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 7,190 Lines • ▼ Show 20 Lines | if (!isSCEVable(V->getType())) | ||||
return getUnknown(V); | return getUnknown(V); | ||||
if (Instruction *I = dyn_cast<Instruction>(V)) { | if (Instruction *I = dyn_cast<Instruction>(V)) { | ||||
// Don't attempt to analyze instructions in blocks that aren't | // Don't attempt to analyze instructions in blocks that aren't | ||||
// reachable. Such instructions don't matter, and they aren't required | // reachable. Such instructions don't matter, and they aren't required | ||||
// to obey basic rules for definitions dominating uses which this | // to obey basic rules for definitions dominating uses which this | ||||
// analysis depends on. | // analysis depends on. | ||||
if (!DT.isReachableFromEntry(I->getParent())) | if (!DT.isReachableFromEntry(I->getParent())) | ||||
return getUnknown(UndefValue::get(V->getType())); | return getUnknown(PoisonValue::get(V->getType())); | ||||
nikic: This change is fine, but I don't think the containsUndef -> containsPoison change makes sense. | |||||
I suppose we would need to check for both undef & poison, which is achieved by just checking for UndefVal (because PoisonValue inherits from UndefValue)? fhahn: I suppose we would need to check for both undef & poison, which is achieved by just checking… | |||||
Not Done ReplyInline ActionsYes, exactly. nikic: Yes, exactly. | |||||
} else if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) | } else if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) | ||||
return getConstant(CI); | return getConstant(CI); | ||||
else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) | else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) | ||||
return GA->isInterposable() ? getUnknown(V) : getSCEV(GA->getAliasee()); | return GA->isInterposable() ? getUnknown(V) : getSCEV(GA->getAliasee()); | ||||
else if (!isa<ConstantExpr>(V)) | else if (!isa<ConstantExpr>(V)) | ||||
return getUnknown(V); | return getUnknown(V); | ||||
const SCEV *LHS; | const SCEV *LHS; | ||||
▲ Show 20 Lines • Show All 7,386 Lines • Show Last 20 Lines |
This change is fine, but I don't think the containsUndef -> containsPoison change makes sense. We can still have SCEVUnknown of UndefValue (from other places), and I believe current containsUndef() callers do want to check for those as well.