Skip to content

Commit 22af55f

Browse files
committed
FastISel: Do not check for module debug info
I don't see the point of this check and SelectionDAG does not perform it. In the normal usecase, if there's no debug info the debug intrinsics would not be there in the first place.
1 parent e108853 commit 22af55f

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,11 +1203,6 @@ void FastISel::handleDbgInfo(const Instruction *II) {
12031203

12041204
if (DbgLabelRecord *DLR = dyn_cast<DbgLabelRecord>(&DR)) {
12051205
assert(DLR->getLabel() && "Missing label");
1206-
if (!FuncInfo.MF->getMMI().hasDebugInfo()) {
1207-
LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DLR << "\n");
1208-
continue;
1209-
}
1210-
12111206
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DLR->getDebugLoc(),
12121207
TII.get(TargetOpcode::DBG_LABEL))
12131208
.addMetadata(DLR->getLabel());
@@ -1402,12 +1397,6 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
14021397
case Intrinsic::dbg_declare: {
14031398
const DbgDeclareInst *DI = cast<DbgDeclareInst>(II);
14041399
assert(DI->getVariable() && "Missing variable");
1405-
if (!FuncInfo.MF->getMMI().hasDebugInfo()) {
1406-
LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DI
1407-
<< " (!hasDebugInfo)\n");
1408-
return true;
1409-
}
1410-
14111400
if (FuncInfo.PreprocessedDbgDeclares.contains(DI))
14121401
return true;
14131402

@@ -1446,11 +1435,6 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
14461435
case Intrinsic::dbg_label: {
14471436
const DbgLabelInst *DI = cast<DbgLabelInst>(II);
14481437
assert(DI->getLabel() && "Missing label");
1449-
if (!FuncInfo.MF->getMMI().hasDebugInfo()) {
1450-
LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DI << "\n");
1451-
return true;
1452-
}
1453-
14541438
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, MIMD,
14551439
TII.get(TargetOpcode::DBG_LABEL)).addMetadata(DI->getLabel());
14561440
return true;

0 commit comments

Comments
 (0)