getIntrinsicID() != Intrinsic::dbg_assign;
}
- void setUndef() {
+ void setKillLocation() {
// TODO: When/if we remove duplicate values from DIArgLists, we don't need
// this set anymore.
SmallPtrSet<Value *, 4> RemovedValues;
}
}
- bool isUndef() const {
+ bool isKillLocation() const {
return (getNumVariableLocationOps() == 0 &&
!getExpression()->isComplex()) ||
any_of(location_ops(), [](Value *V) { return isa<UndefValue>(V); });
// operand is nullptr. We also can't handle variadic DIExpressions yet.
// Some of those conditions don't have a type we can pick for
// undef. Use i32.
- if (DVI->isUndef() || DVI->getValue() == nullptr || DVI->hasArgList())
+ if (DVI->isKillLocation() || DVI->getValue() == nullptr ||
+ DVI->hasArgList())
return UndefValue::get(Type::getInt32Ty(DVI->getContext()));
return DVI->getValue();
};
dbgs()
<< "Unable to find valid location for Debug Value, undefing:\n"
<< *DVI);
- DVI->setUndef();
+ DVI->setKillLocation();
break;
}
llvm::PHINode *LSRInductionVar, DVIRecoveryRec &DVIRec,
const SCEV *SCEVInductionVar,
SCEVDbgValueBuilder IterCountExpr) {
- if (!DVIRec.DVI->isUndef())
+ if (!DVIRec.DVI->isKillLocation())
return false;
// LSR may have caused several changes to the dbg.value in the failed salvage
continue;
// Ensure that if any location op is undef that the dbg.vlue is not
// cached.
- if (DVI->isUndef())
+ if (DVI->isKillLocation())
continue;
// Check that the location op SCEVs are suitable for translation to
bool IsDbgValueKind = (!DAI || at::getAssignmentInsts(DAI).empty());
DebugVariable Aggregate = GetAggregateVariable(DVI);
if (!SeenDefForAggregate.contains(Aggregate)) {
- bool IsUndef = DVI->isUndef() && IsDbgValueKind;
- if (!IsUndef) {
+ bool IsKill = DVI->isKillLocation() && IsDbgValueKind;
+ if (!IsKill) {
SeenDefForAggregate.insert(Aggregate);
} else if (DAI) {
ToBeRemoved.push_back(DAI);
if (I.getDebugLoc().getInlinedAt())
continue;
// Skip undef values.
- if (DVI->isUndef())
+ if (DVI->isKillLocation())
continue;
auto *Var = DVI->getVariable();
if (I.getDebugLoc().getInlinedAt())
continue;
// Skip undef values.
- if (DVI->isUndef())
+ if (DVI->isKillLocation())
continue;
auto *Var = DVI->getVariable();
"There should be a non-PHI instruction in exit block, else these "
"instructions will have no parent.");
for (auto *DVI : DeadDebugInst) {
- DVI->setUndef();
+ DVI->setKillLocation();
DVI->moveBefore(InsertDbgValueBefore);
}
}
auto *FDbgVal = cast<DbgValueInst>(F_.getNextNode());
EXPECT_EQ(FDbgVal->getNumVariableLocationOps(), 1u);
- EXPECT_TRUE(FDbgVal->isUndef());
+ EXPECT_TRUE(FDbgVal->isKillLocation());
SmallVector<DbgValueInst *, 1> FDbgVals;
findDbgValues(FDbgVals, &F_);