-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[DebugInfo][RemoveDIs] Remove some debug intrinsic-only codepaths #143451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
FastISel: we don't need to do debug-aware instruction counting any more, because there are no debug instructions, Autoupgrade: you can no-longer avoid autoupgrading of intrinsics to records DIBuilder: Delete the code for creating debug intrinsics (!) LoopUtils: No need to handle debug intructions, they don't exist These are opportunistic deletions as more places that make use of the IsNewDbgInfoFormat flag are removed.
@llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-debuginfo Author: Jeremy Morse (jmorse) ChangesThese are opportunistic deletions as more places that make use of the IsNewDbgInfoFormat flag are removed. It should (TM)(R) all be dead code now that FastISel: we don't need to do debug-aware instruction counting any more, because there are no debug instructions, Full diff: https://github.com/llvm/llvm-project/pull/143451.diff 6 Files Affected:
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 59cd0dc8dd348..e8a3df3366b2b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1671,9 +1671,6 @@ void FastISel::fastEmitBranch(MachineBasicBlock *MSucc,
const DebugLoc &DbgLoc) {
const BasicBlock *BB = FuncInfo.MBB->getBasicBlock();
bool BlockHasMultipleInstrs = &BB->front() != &BB->back();
- // Handle legacy case of debug intrinsics
- if (BlockHasMultipleInstrs && !BB->getModule()->IsNewDbgInfoFormat)
- BlockHasMultipleInstrs = BB->sizeWithoutDebug() > 1;
if (BlockHasMultipleInstrs && FuncInfo.MBB->isLayoutSuccessor(MSucc)) {
// For more accurate line information if this is the only non-debug
// instruction in the block then emit it, otherwise we have the
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 814c00c669cb3..7de492231bc53 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -4463,7 +4463,6 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) {
Builder.SetInsertPoint(CI->getParent(), CI->getIterator());
if (!NewFn) {
- bool FallthroughToDefaultUpgrade = false;
// Get the Function's name.
StringRef Name = F->getName();
@@ -4491,29 +4490,15 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) {
} else if (IsAMDGCN) {
Rep = upgradeAMDGCNIntrinsicCall(Name, CI, F, Builder);
} else if (IsDbg) {
- // We might have decided we don't want the new format after all between
- // first requesting the upgrade and now; skip the conversion if that is
- // the case, and check here to see if the intrinsic needs to be upgraded
- // normally.
- if (!CI->getModule()->IsNewDbgInfoFormat) {
- bool NeedsUpgrade =
- upgradeIntrinsicFunction1(CI->getCalledFunction(), NewFn, false);
- if (!NeedsUpgrade)
- return;
- FallthroughToDefaultUpgrade = true;
- } else {
- upgradeDbgIntrinsicToDbgRecord(Name, CI);
- }
+ upgradeDbgIntrinsicToDbgRecord(Name, CI);
} else {
llvm_unreachable("Unknown function for CallBase upgrade.");
}
- if (!FallthroughToDefaultUpgrade) {
- if (Rep)
- CI->replaceAllUsesWith(Rep);
- CI->eraseFromParent();
- return;
- }
+ if (Rep)
+ CI->replaceAllUsesWith(Rep);
+ CI->eraseFromParent();
+ return;
}
const auto &DefaultCase = [&]() -> void {
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 5e5ff22132e99..1484c549dd580 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -1047,36 +1047,13 @@ DbgInstPtr DIBuilder::insertDbgAssign(Instruction *LinkedInstr, Value *Val,
LinkedInstr->getMetadata(LLVMContext::MD_DIAssignID));
assert(Link && "Linked instruction must have DIAssign metadata attached");
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR = DbgVariableRecord::createDVRAssign(
- Val, SrcVar, ValExpr, Link, Addr, AddrExpr, DL);
- // Insert after LinkedInstr.
- BasicBlock::iterator NextIt = std::next(LinkedInstr->getIterator());
- NextIt.setHeadBit(true);
- insertDbgVariableRecord(DVR, NextIt);
- return DVR;
- }
-
- LLVMContext &Ctx = LinkedInstr->getContext();
- Module *M = LinkedInstr->getModule();
- if (!AssignFn)
- AssignFn = Intrinsic::getOrInsertDeclaration(M, Intrinsic::dbg_assign);
-
- std::array<Value *, 6> Args = {
- MetadataAsValue::get(Ctx, ValueAsMetadata::get(Val)),
- MetadataAsValue::get(Ctx, SrcVar),
- MetadataAsValue::get(Ctx, ValExpr),
- MetadataAsValue::get(Ctx, Link),
- MetadataAsValue::get(Ctx, ValueAsMetadata::get(Addr)),
- MetadataAsValue::get(Ctx, AddrExpr),
- };
-
- IRBuilder<> B(Ctx);
- B.SetCurrentDebugLocation(DL);
-
- auto *DVI = cast<DbgAssignIntrinsic>(B.CreateCall(AssignFn, Args));
- DVI->insertAfter(LinkedInstr->getIterator());
- return DVI;
+ DbgVariableRecord *DVR = DbgVariableRecord::createDVRAssign(
+ Val, SrcVar, ValExpr, Link, Addr, AddrExpr, DL);
+ // Insert after LinkedInstr.
+ BasicBlock::iterator NextIt = std::next(LinkedInstr->getIterator());
+ NextIt.setHeadBit(true);
+ insertDbgVariableRecord(DVR, NextIt);
+ return DVR;
}
/// Initialize IRBuilder for inserting dbg.declare and dbg.value intrinsics.
@@ -1101,18 +1078,10 @@ DbgInstPtr DIBuilder::insertDbgValueIntrinsic(llvm::Value *Val,
DIExpression *Expr,
const DILocation *DL,
InsertPosition InsertPt) {
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR =
- DbgVariableRecord::createDbgVariableRecord(Val, VarInfo, Expr, DL);
- insertDbgVariableRecord(DVR, InsertPt);
- return DVR;
- }
-
- if (!ValueFn)
- ValueFn = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::dbg_value);
- auto *DVI = insertDbgIntrinsic(ValueFn, Val, VarInfo, Expr, DL, InsertPt);
- cast<CallInst>(DVI)->setTailCall();
- return DVI;
+ DbgVariableRecord *DVR =
+ DbgVariableRecord::createDbgVariableRecord(Val, VarInfo, Expr, DL);
+ insertDbgVariableRecord(DVR, InsertPt);
+ return DVR;
}
DbgInstPtr DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
@@ -1124,25 +1093,10 @@ DbgInstPtr DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
VarInfo->getScope()->getSubprogram() &&
"Expected matching subprograms");
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR =
- DbgVariableRecord::createDVRDeclare(Storage, VarInfo, Expr, DL);
- insertDbgVariableRecord(DVR, InsertPt);
- return DVR;
- }
-
- if (!DeclareFn)
- DeclareFn = getDeclareIntrin(M);
-
- trackIfUnresolved(VarInfo);
- trackIfUnresolved(Expr);
- Value *Args[] = {getDbgIntrinsicValueImpl(VMContext, Storage),
- MetadataAsValue::get(VMContext, VarInfo),
- MetadataAsValue::get(VMContext, Expr)};
-
- IRBuilder<> B(DL->getContext());
- initIRBuilder(B, DL, InsertPt);
- return B.CreateCall(DeclareFn, Args);
+ DbgVariableRecord *DVR =
+ DbgVariableRecord::createDVRDeclare(Storage, VarInfo, Expr, DL);
+ insertDbgVariableRecord(DVR, InsertPt);
+ return DVR;
}
void DIBuilder::insertDbgVariableRecord(DbgVariableRecord *DVR,
@@ -1191,23 +1145,12 @@ DbgInstPtr DIBuilder::insertLabel(DILabel *LabelInfo, const DILocation *DL,
"Expected matching subprograms");
trackIfUnresolved(LabelInfo);
- if (M.IsNewDbgInfoFormat) {
- DbgLabelRecord *DLR = new DbgLabelRecord(LabelInfo, DL);
- if (InsertPt.isValid()) {
- auto *BB = InsertPt.getBasicBlock();
- BB->insertDbgRecordBefore(DLR, InsertPt);
- }
- return DLR;
+ DbgLabelRecord *DLR = new DbgLabelRecord(LabelInfo, DL);
+ if (InsertPt.isValid()) {
+ auto *BB = InsertPt.getBasicBlock();
+ BB->insertDbgRecordBefore(DLR, InsertPt);
}
-
- if (!LabelFn)
- LabelFn = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::dbg_label);
-
- Value *Args[] = {MetadataAsValue::get(VMContext, LabelInfo)};
-
- IRBuilder<> B(DL->getContext());
- initIRBuilder(B, DL, InsertPt);
- return B.CreateCall(LabelFn, Args);
+ return DLR;
}
void DIBuilder::replaceVTableHolder(DICompositeType *&T, DIType *VTableHolder) {
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 7db9891fdbd75..2a84e7bae0f10 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -2123,22 +2123,11 @@ static void emitDbgAssign(AssignmentInfo Info, Value *Val, Value *Dest,
Expr = *R;
}
DIExpression *AddrExpr = DIExpression::get(StoreLikeInst.getContext(), {});
- if (StoreLikeInst.getParent()->IsNewDbgInfoFormat) {
- auto *Assign = DbgVariableRecord::createLinkedDVRAssign(
- &StoreLikeInst, Val, VarRec.Var, Expr, Dest, AddrExpr, VarRec.DL);
- (void)Assign;
- LLVM_DEBUG(if (Assign) errs() << " > INSERT: " << *Assign << "\n");
- return;
- }
- auto Assign = DIB.insertDbgAssign(&StoreLikeInst, Val, VarRec.Var, Expr, Dest,
- AddrExpr, VarRec.DL);
+ auto *Assign = DbgVariableRecord::createLinkedDVRAssign(
+ &StoreLikeInst, Val, VarRec.Var, Expr, Dest, AddrExpr, VarRec.DL);
(void)Assign;
- LLVM_DEBUG(if (!Assign.isNull()) {
- if (const auto *Record = dyn_cast<DbgRecord *>(Assign))
- errs() << " > INSERT: " << *Record << "\n";
- else
- errs() << " > INSERT: " << *cast<Instruction *>(Assign) << "\n";
- });
+ LLVM_DEBUG(if (Assign) errs() << " > INSERT: " << *Assign << "\n");
+ return;
}
#undef DEBUG_TYPE // Silence redefinition warning (from ConstantsContext.h).
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 3621989424e83..6a86a9b2f50e1 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -605,7 +605,6 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
// Use a map to unique and a vector to guarantee deterministic ordering.
llvm::SmallDenseSet<DebugVariable, 4> DeadDebugSet;
- llvm::SmallVector<DbgVariableIntrinsic *, 4> DeadDebugInst;
llvm::SmallVector<DbgVariableRecord *, 4> DeadDbgVariableRecords;
if (ExitBlock) {
@@ -632,29 +631,19 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
U.set(Poison);
}
- // RemoveDIs: do the same as below for DbgVariableRecords.
- if (Block->IsNewDbgInfoFormat) {
- for (DbgVariableRecord &DVR : llvm::make_early_inc_range(
- filterDbgVars(I.getDbgRecordRange()))) {
- DebugVariable Key(DVR.getVariable(), DVR.getExpression(),
- DVR.getDebugLoc().get());
- if (!DeadDebugSet.insert(Key).second)
- continue;
- // Unlinks the DVR from it's container, for later insertion.
- DVR.removeFromParent();
- DeadDbgVariableRecords.push_back(&DVR);
- }
- }
-
- // For one of each variable encountered, preserve a debug intrinsic (set
+ // For one of each variable encountered, preserve a debug record (set
// to Poison) and transfer it to the loop exit. This terminates any
// variable locations that were set during the loop.
- auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I);
- if (!DVI)
- continue;
- if (!DeadDebugSet.insert(DebugVariable(DVI)).second)
- continue;
- DeadDebugInst.push_back(DVI);
+ for (DbgVariableRecord &DVR : llvm::make_early_inc_range(
+ filterDbgVars(I.getDbgRecordRange()))) {
+ DebugVariable Key(DVR.getVariable(), DVR.getExpression(),
+ DVR.getDebugLoc().get());
+ if (!DeadDebugSet.insert(Key).second)
+ continue;
+ // Unlinks the DVR from it's container, for later insertion.
+ DVR.removeFromParent();
+ DeadDbgVariableRecords.push_back(&DVR);
+ }
}
// After the loop has been deleted all the values defined and modified
@@ -670,9 +659,6 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
"There should be a non-PHI instruction in exit block, else these "
"instructions will have no parent.");
- for (auto *DVI : DeadDebugInst)
- DVI->moveBefore(*ExitBlock, InsertDbgValueBefore);
-
// Due to the "head" bit in BasicBlock::iterator, we're going to insert
// each DbgVariableRecord right at the start of the block, wheras dbg.values
// would be repeatedly inserted before the first instruction. To replicate
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp
index b7eb0af728331..942c669952d1e 100644
--- a/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/llvm/unittests/IR/IRBuilderTest.cpp
@@ -1011,18 +1011,8 @@ TEST_F(IRBuilderTest, DIBuilder) {
EXPECT_TRUE(verifyModule(*M));
};
- // Test in new-debug mode.
- EXPECT_TRUE(M->IsNewDbgInfoFormat);
RunTest();
-
- // Test in old-debug mode.
- // Reset the test then call convertFromNewDbgValues to flip the flag
- // on the test's Module, Function and BasicBlock.
TearDown();
- SetUp();
- M->convertFromNewDbgValues();
- EXPECT_FALSE(M->IsNewDbgInfoFormat);
- RunTest();
}
TEST_F(IRBuilderTest, createArtificialSubprogram) {
|
@llvm/pr-subscribers-llvm-selectiondag Author: Jeremy Morse (jmorse) ChangesThese are opportunistic deletions as more places that make use of the IsNewDbgInfoFormat flag are removed. It should (TM)(R) all be dead code now that FastISel: we don't need to do debug-aware instruction counting any more, because there are no debug instructions, Full diff: https://github.com/llvm/llvm-project/pull/143451.diff 6 Files Affected:
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 59cd0dc8dd348..e8a3df3366b2b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1671,9 +1671,6 @@ void FastISel::fastEmitBranch(MachineBasicBlock *MSucc,
const DebugLoc &DbgLoc) {
const BasicBlock *BB = FuncInfo.MBB->getBasicBlock();
bool BlockHasMultipleInstrs = &BB->front() != &BB->back();
- // Handle legacy case of debug intrinsics
- if (BlockHasMultipleInstrs && !BB->getModule()->IsNewDbgInfoFormat)
- BlockHasMultipleInstrs = BB->sizeWithoutDebug() > 1;
if (BlockHasMultipleInstrs && FuncInfo.MBB->isLayoutSuccessor(MSucc)) {
// For more accurate line information if this is the only non-debug
// instruction in the block then emit it, otherwise we have the
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 814c00c669cb3..7de492231bc53 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -4463,7 +4463,6 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) {
Builder.SetInsertPoint(CI->getParent(), CI->getIterator());
if (!NewFn) {
- bool FallthroughToDefaultUpgrade = false;
// Get the Function's name.
StringRef Name = F->getName();
@@ -4491,29 +4490,15 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) {
} else if (IsAMDGCN) {
Rep = upgradeAMDGCNIntrinsicCall(Name, CI, F, Builder);
} else if (IsDbg) {
- // We might have decided we don't want the new format after all between
- // first requesting the upgrade and now; skip the conversion if that is
- // the case, and check here to see if the intrinsic needs to be upgraded
- // normally.
- if (!CI->getModule()->IsNewDbgInfoFormat) {
- bool NeedsUpgrade =
- upgradeIntrinsicFunction1(CI->getCalledFunction(), NewFn, false);
- if (!NeedsUpgrade)
- return;
- FallthroughToDefaultUpgrade = true;
- } else {
- upgradeDbgIntrinsicToDbgRecord(Name, CI);
- }
+ upgradeDbgIntrinsicToDbgRecord(Name, CI);
} else {
llvm_unreachable("Unknown function for CallBase upgrade.");
}
- if (!FallthroughToDefaultUpgrade) {
- if (Rep)
- CI->replaceAllUsesWith(Rep);
- CI->eraseFromParent();
- return;
- }
+ if (Rep)
+ CI->replaceAllUsesWith(Rep);
+ CI->eraseFromParent();
+ return;
}
const auto &DefaultCase = [&]() -> void {
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 5e5ff22132e99..1484c549dd580 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -1047,36 +1047,13 @@ DbgInstPtr DIBuilder::insertDbgAssign(Instruction *LinkedInstr, Value *Val,
LinkedInstr->getMetadata(LLVMContext::MD_DIAssignID));
assert(Link && "Linked instruction must have DIAssign metadata attached");
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR = DbgVariableRecord::createDVRAssign(
- Val, SrcVar, ValExpr, Link, Addr, AddrExpr, DL);
- // Insert after LinkedInstr.
- BasicBlock::iterator NextIt = std::next(LinkedInstr->getIterator());
- NextIt.setHeadBit(true);
- insertDbgVariableRecord(DVR, NextIt);
- return DVR;
- }
-
- LLVMContext &Ctx = LinkedInstr->getContext();
- Module *M = LinkedInstr->getModule();
- if (!AssignFn)
- AssignFn = Intrinsic::getOrInsertDeclaration(M, Intrinsic::dbg_assign);
-
- std::array<Value *, 6> Args = {
- MetadataAsValue::get(Ctx, ValueAsMetadata::get(Val)),
- MetadataAsValue::get(Ctx, SrcVar),
- MetadataAsValue::get(Ctx, ValExpr),
- MetadataAsValue::get(Ctx, Link),
- MetadataAsValue::get(Ctx, ValueAsMetadata::get(Addr)),
- MetadataAsValue::get(Ctx, AddrExpr),
- };
-
- IRBuilder<> B(Ctx);
- B.SetCurrentDebugLocation(DL);
-
- auto *DVI = cast<DbgAssignIntrinsic>(B.CreateCall(AssignFn, Args));
- DVI->insertAfter(LinkedInstr->getIterator());
- return DVI;
+ DbgVariableRecord *DVR = DbgVariableRecord::createDVRAssign(
+ Val, SrcVar, ValExpr, Link, Addr, AddrExpr, DL);
+ // Insert after LinkedInstr.
+ BasicBlock::iterator NextIt = std::next(LinkedInstr->getIterator());
+ NextIt.setHeadBit(true);
+ insertDbgVariableRecord(DVR, NextIt);
+ return DVR;
}
/// Initialize IRBuilder for inserting dbg.declare and dbg.value intrinsics.
@@ -1101,18 +1078,10 @@ DbgInstPtr DIBuilder::insertDbgValueIntrinsic(llvm::Value *Val,
DIExpression *Expr,
const DILocation *DL,
InsertPosition InsertPt) {
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR =
- DbgVariableRecord::createDbgVariableRecord(Val, VarInfo, Expr, DL);
- insertDbgVariableRecord(DVR, InsertPt);
- return DVR;
- }
-
- if (!ValueFn)
- ValueFn = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::dbg_value);
- auto *DVI = insertDbgIntrinsic(ValueFn, Val, VarInfo, Expr, DL, InsertPt);
- cast<CallInst>(DVI)->setTailCall();
- return DVI;
+ DbgVariableRecord *DVR =
+ DbgVariableRecord::createDbgVariableRecord(Val, VarInfo, Expr, DL);
+ insertDbgVariableRecord(DVR, InsertPt);
+ return DVR;
}
DbgInstPtr DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
@@ -1124,25 +1093,10 @@ DbgInstPtr DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
VarInfo->getScope()->getSubprogram() &&
"Expected matching subprograms");
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR =
- DbgVariableRecord::createDVRDeclare(Storage, VarInfo, Expr, DL);
- insertDbgVariableRecord(DVR, InsertPt);
- return DVR;
- }
-
- if (!DeclareFn)
- DeclareFn = getDeclareIntrin(M);
-
- trackIfUnresolved(VarInfo);
- trackIfUnresolved(Expr);
- Value *Args[] = {getDbgIntrinsicValueImpl(VMContext, Storage),
- MetadataAsValue::get(VMContext, VarInfo),
- MetadataAsValue::get(VMContext, Expr)};
-
- IRBuilder<> B(DL->getContext());
- initIRBuilder(B, DL, InsertPt);
- return B.CreateCall(DeclareFn, Args);
+ DbgVariableRecord *DVR =
+ DbgVariableRecord::createDVRDeclare(Storage, VarInfo, Expr, DL);
+ insertDbgVariableRecord(DVR, InsertPt);
+ return DVR;
}
void DIBuilder::insertDbgVariableRecord(DbgVariableRecord *DVR,
@@ -1191,23 +1145,12 @@ DbgInstPtr DIBuilder::insertLabel(DILabel *LabelInfo, const DILocation *DL,
"Expected matching subprograms");
trackIfUnresolved(LabelInfo);
- if (M.IsNewDbgInfoFormat) {
- DbgLabelRecord *DLR = new DbgLabelRecord(LabelInfo, DL);
- if (InsertPt.isValid()) {
- auto *BB = InsertPt.getBasicBlock();
- BB->insertDbgRecordBefore(DLR, InsertPt);
- }
- return DLR;
+ DbgLabelRecord *DLR = new DbgLabelRecord(LabelInfo, DL);
+ if (InsertPt.isValid()) {
+ auto *BB = InsertPt.getBasicBlock();
+ BB->insertDbgRecordBefore(DLR, InsertPt);
}
-
- if (!LabelFn)
- LabelFn = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::dbg_label);
-
- Value *Args[] = {MetadataAsValue::get(VMContext, LabelInfo)};
-
- IRBuilder<> B(DL->getContext());
- initIRBuilder(B, DL, InsertPt);
- return B.CreateCall(LabelFn, Args);
+ return DLR;
}
void DIBuilder::replaceVTableHolder(DICompositeType *&T, DIType *VTableHolder) {
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 7db9891fdbd75..2a84e7bae0f10 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -2123,22 +2123,11 @@ static void emitDbgAssign(AssignmentInfo Info, Value *Val, Value *Dest,
Expr = *R;
}
DIExpression *AddrExpr = DIExpression::get(StoreLikeInst.getContext(), {});
- if (StoreLikeInst.getParent()->IsNewDbgInfoFormat) {
- auto *Assign = DbgVariableRecord::createLinkedDVRAssign(
- &StoreLikeInst, Val, VarRec.Var, Expr, Dest, AddrExpr, VarRec.DL);
- (void)Assign;
- LLVM_DEBUG(if (Assign) errs() << " > INSERT: " << *Assign << "\n");
- return;
- }
- auto Assign = DIB.insertDbgAssign(&StoreLikeInst, Val, VarRec.Var, Expr, Dest,
- AddrExpr, VarRec.DL);
+ auto *Assign = DbgVariableRecord::createLinkedDVRAssign(
+ &StoreLikeInst, Val, VarRec.Var, Expr, Dest, AddrExpr, VarRec.DL);
(void)Assign;
- LLVM_DEBUG(if (!Assign.isNull()) {
- if (const auto *Record = dyn_cast<DbgRecord *>(Assign))
- errs() << " > INSERT: " << *Record << "\n";
- else
- errs() << " > INSERT: " << *cast<Instruction *>(Assign) << "\n";
- });
+ LLVM_DEBUG(if (Assign) errs() << " > INSERT: " << *Assign << "\n");
+ return;
}
#undef DEBUG_TYPE // Silence redefinition warning (from ConstantsContext.h).
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 3621989424e83..6a86a9b2f50e1 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -605,7 +605,6 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
// Use a map to unique and a vector to guarantee deterministic ordering.
llvm::SmallDenseSet<DebugVariable, 4> DeadDebugSet;
- llvm::SmallVector<DbgVariableIntrinsic *, 4> DeadDebugInst;
llvm::SmallVector<DbgVariableRecord *, 4> DeadDbgVariableRecords;
if (ExitBlock) {
@@ -632,29 +631,19 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
U.set(Poison);
}
- // RemoveDIs: do the same as below for DbgVariableRecords.
- if (Block->IsNewDbgInfoFormat) {
- for (DbgVariableRecord &DVR : llvm::make_early_inc_range(
- filterDbgVars(I.getDbgRecordRange()))) {
- DebugVariable Key(DVR.getVariable(), DVR.getExpression(),
- DVR.getDebugLoc().get());
- if (!DeadDebugSet.insert(Key).second)
- continue;
- // Unlinks the DVR from it's container, for later insertion.
- DVR.removeFromParent();
- DeadDbgVariableRecords.push_back(&DVR);
- }
- }
-
- // For one of each variable encountered, preserve a debug intrinsic (set
+ // For one of each variable encountered, preserve a debug record (set
// to Poison) and transfer it to the loop exit. This terminates any
// variable locations that were set during the loop.
- auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I);
- if (!DVI)
- continue;
- if (!DeadDebugSet.insert(DebugVariable(DVI)).second)
- continue;
- DeadDebugInst.push_back(DVI);
+ for (DbgVariableRecord &DVR : llvm::make_early_inc_range(
+ filterDbgVars(I.getDbgRecordRange()))) {
+ DebugVariable Key(DVR.getVariable(), DVR.getExpression(),
+ DVR.getDebugLoc().get());
+ if (!DeadDebugSet.insert(Key).second)
+ continue;
+ // Unlinks the DVR from it's container, for later insertion.
+ DVR.removeFromParent();
+ DeadDbgVariableRecords.push_back(&DVR);
+ }
}
// After the loop has been deleted all the values defined and modified
@@ -670,9 +659,6 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
"There should be a non-PHI instruction in exit block, else these "
"instructions will have no parent.");
- for (auto *DVI : DeadDebugInst)
- DVI->moveBefore(*ExitBlock, InsertDbgValueBefore);
-
// Due to the "head" bit in BasicBlock::iterator, we're going to insert
// each DbgVariableRecord right at the start of the block, wheras dbg.values
// would be repeatedly inserted before the first instruction. To replicate
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp
index b7eb0af728331..942c669952d1e 100644
--- a/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/llvm/unittests/IR/IRBuilderTest.cpp
@@ -1011,18 +1011,8 @@ TEST_F(IRBuilderTest, DIBuilder) {
EXPECT_TRUE(verifyModule(*M));
};
- // Test in new-debug mode.
- EXPECT_TRUE(M->IsNewDbgInfoFormat);
RunTest();
-
- // Test in old-debug mode.
- // Reset the test then call convertFromNewDbgValues to flip the flag
- // on the test's Module, Function and BasicBlock.
TearDown();
- SetUp();
- M->convertFromNewDbgValues();
- EXPECT_FALSE(M->IsNewDbgInfoFormat);
- RunTest();
}
TEST_F(IRBuilderTest, createArtificialSubprogram) {
|
@llvm/pr-subscribers-llvm-transforms Author: Jeremy Morse (jmorse) ChangesThese are opportunistic deletions as more places that make use of the IsNewDbgInfoFormat flag are removed. It should (TM)(R) all be dead code now that FastISel: we don't need to do debug-aware instruction counting any more, because there are no debug instructions, Full diff: https://github.com/llvm/llvm-project/pull/143451.diff 6 Files Affected:
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 59cd0dc8dd348..e8a3df3366b2b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1671,9 +1671,6 @@ void FastISel::fastEmitBranch(MachineBasicBlock *MSucc,
const DebugLoc &DbgLoc) {
const BasicBlock *BB = FuncInfo.MBB->getBasicBlock();
bool BlockHasMultipleInstrs = &BB->front() != &BB->back();
- // Handle legacy case of debug intrinsics
- if (BlockHasMultipleInstrs && !BB->getModule()->IsNewDbgInfoFormat)
- BlockHasMultipleInstrs = BB->sizeWithoutDebug() > 1;
if (BlockHasMultipleInstrs && FuncInfo.MBB->isLayoutSuccessor(MSucc)) {
// For more accurate line information if this is the only non-debug
// instruction in the block then emit it, otherwise we have the
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 814c00c669cb3..7de492231bc53 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -4463,7 +4463,6 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) {
Builder.SetInsertPoint(CI->getParent(), CI->getIterator());
if (!NewFn) {
- bool FallthroughToDefaultUpgrade = false;
// Get the Function's name.
StringRef Name = F->getName();
@@ -4491,29 +4490,15 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) {
} else if (IsAMDGCN) {
Rep = upgradeAMDGCNIntrinsicCall(Name, CI, F, Builder);
} else if (IsDbg) {
- // We might have decided we don't want the new format after all between
- // first requesting the upgrade and now; skip the conversion if that is
- // the case, and check here to see if the intrinsic needs to be upgraded
- // normally.
- if (!CI->getModule()->IsNewDbgInfoFormat) {
- bool NeedsUpgrade =
- upgradeIntrinsicFunction1(CI->getCalledFunction(), NewFn, false);
- if (!NeedsUpgrade)
- return;
- FallthroughToDefaultUpgrade = true;
- } else {
- upgradeDbgIntrinsicToDbgRecord(Name, CI);
- }
+ upgradeDbgIntrinsicToDbgRecord(Name, CI);
} else {
llvm_unreachable("Unknown function for CallBase upgrade.");
}
- if (!FallthroughToDefaultUpgrade) {
- if (Rep)
- CI->replaceAllUsesWith(Rep);
- CI->eraseFromParent();
- return;
- }
+ if (Rep)
+ CI->replaceAllUsesWith(Rep);
+ CI->eraseFromParent();
+ return;
}
const auto &DefaultCase = [&]() -> void {
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 5e5ff22132e99..1484c549dd580 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -1047,36 +1047,13 @@ DbgInstPtr DIBuilder::insertDbgAssign(Instruction *LinkedInstr, Value *Val,
LinkedInstr->getMetadata(LLVMContext::MD_DIAssignID));
assert(Link && "Linked instruction must have DIAssign metadata attached");
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR = DbgVariableRecord::createDVRAssign(
- Val, SrcVar, ValExpr, Link, Addr, AddrExpr, DL);
- // Insert after LinkedInstr.
- BasicBlock::iterator NextIt = std::next(LinkedInstr->getIterator());
- NextIt.setHeadBit(true);
- insertDbgVariableRecord(DVR, NextIt);
- return DVR;
- }
-
- LLVMContext &Ctx = LinkedInstr->getContext();
- Module *M = LinkedInstr->getModule();
- if (!AssignFn)
- AssignFn = Intrinsic::getOrInsertDeclaration(M, Intrinsic::dbg_assign);
-
- std::array<Value *, 6> Args = {
- MetadataAsValue::get(Ctx, ValueAsMetadata::get(Val)),
- MetadataAsValue::get(Ctx, SrcVar),
- MetadataAsValue::get(Ctx, ValExpr),
- MetadataAsValue::get(Ctx, Link),
- MetadataAsValue::get(Ctx, ValueAsMetadata::get(Addr)),
- MetadataAsValue::get(Ctx, AddrExpr),
- };
-
- IRBuilder<> B(Ctx);
- B.SetCurrentDebugLocation(DL);
-
- auto *DVI = cast<DbgAssignIntrinsic>(B.CreateCall(AssignFn, Args));
- DVI->insertAfter(LinkedInstr->getIterator());
- return DVI;
+ DbgVariableRecord *DVR = DbgVariableRecord::createDVRAssign(
+ Val, SrcVar, ValExpr, Link, Addr, AddrExpr, DL);
+ // Insert after LinkedInstr.
+ BasicBlock::iterator NextIt = std::next(LinkedInstr->getIterator());
+ NextIt.setHeadBit(true);
+ insertDbgVariableRecord(DVR, NextIt);
+ return DVR;
}
/// Initialize IRBuilder for inserting dbg.declare and dbg.value intrinsics.
@@ -1101,18 +1078,10 @@ DbgInstPtr DIBuilder::insertDbgValueIntrinsic(llvm::Value *Val,
DIExpression *Expr,
const DILocation *DL,
InsertPosition InsertPt) {
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR =
- DbgVariableRecord::createDbgVariableRecord(Val, VarInfo, Expr, DL);
- insertDbgVariableRecord(DVR, InsertPt);
- return DVR;
- }
-
- if (!ValueFn)
- ValueFn = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::dbg_value);
- auto *DVI = insertDbgIntrinsic(ValueFn, Val, VarInfo, Expr, DL, InsertPt);
- cast<CallInst>(DVI)->setTailCall();
- return DVI;
+ DbgVariableRecord *DVR =
+ DbgVariableRecord::createDbgVariableRecord(Val, VarInfo, Expr, DL);
+ insertDbgVariableRecord(DVR, InsertPt);
+ return DVR;
}
DbgInstPtr DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
@@ -1124,25 +1093,10 @@ DbgInstPtr DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
VarInfo->getScope()->getSubprogram() &&
"Expected matching subprograms");
- if (M.IsNewDbgInfoFormat) {
- DbgVariableRecord *DVR =
- DbgVariableRecord::createDVRDeclare(Storage, VarInfo, Expr, DL);
- insertDbgVariableRecord(DVR, InsertPt);
- return DVR;
- }
-
- if (!DeclareFn)
- DeclareFn = getDeclareIntrin(M);
-
- trackIfUnresolved(VarInfo);
- trackIfUnresolved(Expr);
- Value *Args[] = {getDbgIntrinsicValueImpl(VMContext, Storage),
- MetadataAsValue::get(VMContext, VarInfo),
- MetadataAsValue::get(VMContext, Expr)};
-
- IRBuilder<> B(DL->getContext());
- initIRBuilder(B, DL, InsertPt);
- return B.CreateCall(DeclareFn, Args);
+ DbgVariableRecord *DVR =
+ DbgVariableRecord::createDVRDeclare(Storage, VarInfo, Expr, DL);
+ insertDbgVariableRecord(DVR, InsertPt);
+ return DVR;
}
void DIBuilder::insertDbgVariableRecord(DbgVariableRecord *DVR,
@@ -1191,23 +1145,12 @@ DbgInstPtr DIBuilder::insertLabel(DILabel *LabelInfo, const DILocation *DL,
"Expected matching subprograms");
trackIfUnresolved(LabelInfo);
- if (M.IsNewDbgInfoFormat) {
- DbgLabelRecord *DLR = new DbgLabelRecord(LabelInfo, DL);
- if (InsertPt.isValid()) {
- auto *BB = InsertPt.getBasicBlock();
- BB->insertDbgRecordBefore(DLR, InsertPt);
- }
- return DLR;
+ DbgLabelRecord *DLR = new DbgLabelRecord(LabelInfo, DL);
+ if (InsertPt.isValid()) {
+ auto *BB = InsertPt.getBasicBlock();
+ BB->insertDbgRecordBefore(DLR, InsertPt);
}
-
- if (!LabelFn)
- LabelFn = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::dbg_label);
-
- Value *Args[] = {MetadataAsValue::get(VMContext, LabelInfo)};
-
- IRBuilder<> B(DL->getContext());
- initIRBuilder(B, DL, InsertPt);
- return B.CreateCall(LabelFn, Args);
+ return DLR;
}
void DIBuilder::replaceVTableHolder(DICompositeType *&T, DIType *VTableHolder) {
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 7db9891fdbd75..2a84e7bae0f10 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -2123,22 +2123,11 @@ static void emitDbgAssign(AssignmentInfo Info, Value *Val, Value *Dest,
Expr = *R;
}
DIExpression *AddrExpr = DIExpression::get(StoreLikeInst.getContext(), {});
- if (StoreLikeInst.getParent()->IsNewDbgInfoFormat) {
- auto *Assign = DbgVariableRecord::createLinkedDVRAssign(
- &StoreLikeInst, Val, VarRec.Var, Expr, Dest, AddrExpr, VarRec.DL);
- (void)Assign;
- LLVM_DEBUG(if (Assign) errs() << " > INSERT: " << *Assign << "\n");
- return;
- }
- auto Assign = DIB.insertDbgAssign(&StoreLikeInst, Val, VarRec.Var, Expr, Dest,
- AddrExpr, VarRec.DL);
+ auto *Assign = DbgVariableRecord::createLinkedDVRAssign(
+ &StoreLikeInst, Val, VarRec.Var, Expr, Dest, AddrExpr, VarRec.DL);
(void)Assign;
- LLVM_DEBUG(if (!Assign.isNull()) {
- if (const auto *Record = dyn_cast<DbgRecord *>(Assign))
- errs() << " > INSERT: " << *Record << "\n";
- else
- errs() << " > INSERT: " << *cast<Instruction *>(Assign) << "\n";
- });
+ LLVM_DEBUG(if (Assign) errs() << " > INSERT: " << *Assign << "\n");
+ return;
}
#undef DEBUG_TYPE // Silence redefinition warning (from ConstantsContext.h).
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 3621989424e83..6a86a9b2f50e1 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -605,7 +605,6 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
// Use a map to unique and a vector to guarantee deterministic ordering.
llvm::SmallDenseSet<DebugVariable, 4> DeadDebugSet;
- llvm::SmallVector<DbgVariableIntrinsic *, 4> DeadDebugInst;
llvm::SmallVector<DbgVariableRecord *, 4> DeadDbgVariableRecords;
if (ExitBlock) {
@@ -632,29 +631,19 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
U.set(Poison);
}
- // RemoveDIs: do the same as below for DbgVariableRecords.
- if (Block->IsNewDbgInfoFormat) {
- for (DbgVariableRecord &DVR : llvm::make_early_inc_range(
- filterDbgVars(I.getDbgRecordRange()))) {
- DebugVariable Key(DVR.getVariable(), DVR.getExpression(),
- DVR.getDebugLoc().get());
- if (!DeadDebugSet.insert(Key).second)
- continue;
- // Unlinks the DVR from it's container, for later insertion.
- DVR.removeFromParent();
- DeadDbgVariableRecords.push_back(&DVR);
- }
- }
-
- // For one of each variable encountered, preserve a debug intrinsic (set
+ // For one of each variable encountered, preserve a debug record (set
// to Poison) and transfer it to the loop exit. This terminates any
// variable locations that were set during the loop.
- auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I);
- if (!DVI)
- continue;
- if (!DeadDebugSet.insert(DebugVariable(DVI)).second)
- continue;
- DeadDebugInst.push_back(DVI);
+ for (DbgVariableRecord &DVR : llvm::make_early_inc_range(
+ filterDbgVars(I.getDbgRecordRange()))) {
+ DebugVariable Key(DVR.getVariable(), DVR.getExpression(),
+ DVR.getDebugLoc().get());
+ if (!DeadDebugSet.insert(Key).second)
+ continue;
+ // Unlinks the DVR from it's container, for later insertion.
+ DVR.removeFromParent();
+ DeadDbgVariableRecords.push_back(&DVR);
+ }
}
// After the loop has been deleted all the values defined and modified
@@ -670,9 +659,6 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
"There should be a non-PHI instruction in exit block, else these "
"instructions will have no parent.");
- for (auto *DVI : DeadDebugInst)
- DVI->moveBefore(*ExitBlock, InsertDbgValueBefore);
-
// Due to the "head" bit in BasicBlock::iterator, we're going to insert
// each DbgVariableRecord right at the start of the block, wheras dbg.values
// would be repeatedly inserted before the first instruction. To replicate
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp
index b7eb0af728331..942c669952d1e 100644
--- a/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/llvm/unittests/IR/IRBuilderTest.cpp
@@ -1011,18 +1011,8 @@ TEST_F(IRBuilderTest, DIBuilder) {
EXPECT_TRUE(verifyModule(*M));
};
- // Test in new-debug mode.
- EXPECT_TRUE(M->IsNewDbgInfoFormat);
RunTest();
-
- // Test in old-debug mode.
- // Reset the test then call convertFromNewDbgValues to flip the flag
- // on the test's Module, Function and BasicBlock.
TearDown();
- SetUp();
- M->convertFromNewDbgValues();
- EXPECT_FALSE(M->IsNewDbgInfoFormat);
- RunTest();
}
TEST_F(IRBuilderTest, createArtificialSubprogram) {
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🪚 (pls make clang-format-bot happy)
It warms my heart to know debug instructions are a thing of the past. They caused no end of problems. |
My favourite quote about intrinsics: "A dbg.value is.... is a thing of pure evil". Also we still have debug instructions after isel sadly ._. (CI failures were due to an assertion that was deleted in 3d7aa96). |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/129/builds/22509 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/207/builds/2393 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/116/builds/14002 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/138/builds/14391 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/34485 Here is the relevant piece of the build log for the reference
|
Specifically this is the assertion in BasicBlock.cpp. Now that we're not examining or setting that flag consistently (because it'll be deleted in about an hour) there's no need to keep this assertion. Original commit title: [DebugInfo][RemoveDIs] Remove some debug intrinsic-only codepaths (#143451)
…vm#143451) These are opportunistic deletions as more places that make use of the IsNewDbgInfoFormat flag are removed. It should (TM)(R) all be dead code now that `IsNewDbgInfoFormat` should be true everywhere. FastISel: we don't need to do debug-aware instruction counting any more, because there are no debug instructions, Autoupgrade: you can no-longer avoid autoupgrading of intrinsics to records DIBuilder: Delete the code for creating debug intrinsics (!) LoopUtils: No need to handle debug instructions, they don't exist
…aths (llvm#143451)" This reverts commit c71a2e6. /me squints -- this is hitting an assertion I thought had been deleted, will revert and investigate for a bit.
Specifically this is the assertion in BasicBlock.cpp. Now that we're not examining or setting that flag consistently (because it'll be deleted in about an hour) there's no need to keep this assertion. Original commit title: [DebugInfo][RemoveDIs] Remove some debug intrinsic-only codepaths (llvm#143451)
…vm#143451) These are opportunistic deletions as more places that make use of the IsNewDbgInfoFormat flag are removed. It should (TM)(R) all be dead code now that `IsNewDbgInfoFormat` should be true everywhere. FastISel: we don't need to do debug-aware instruction counting any more, because there are no debug instructions, Autoupgrade: you can no-longer avoid autoupgrading of intrinsics to records DIBuilder: Delete the code for creating debug intrinsics (!) LoopUtils: No need to handle debug instructions, they don't exist
…aths (llvm#143451)" This reverts commit c71a2e6. /me squints -- this is hitting an assertion I thought had been deleted, will revert and investigate for a bit.
Specifically this is the assertion in BasicBlock.cpp. Now that we're not examining or setting that flag consistently (because it'll be deleted in about an hour) there's no need to keep this assertion. Original commit title: [DebugInfo][RemoveDIs] Remove some debug intrinsic-only codepaths (llvm#143451)
These are opportunistic deletions as more places that make use of the IsNewDbgInfoFormat flag are removed. It should (TM)(R) all be dead code now that
IsNewDbgInfoFormat
should be true everywhere.FastISel: we don't need to do debug-aware instruction counting any more, because there are no debug instructions,
Autoupgrade: you can no-longer avoid autoupgrading of intrinsics to records
DIBuilder: Delete the code for creating debug intrinsics (!)
LoopUtils: No need to handle debug instructions, they don't exist