Skip to content

Commit 03494e0

Browse files
committed
Use dbgs() consistently for -debug printouts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179894 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 7a7e83a commit 03494e0

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ class ISelUpdater : public SelectionDAG::DAGUpdateListener {
746746
} // end anonymous namespace
747747

748748
void SelectionDAGISel::DoInstructionSelection() {
749-
DEBUG(errs() << "===== Instruction selection begins: BB#"
749+
DEBUG(dbgs() << "===== Instruction selection begins: BB#"
750750
<< FuncInfo->MBB->getNumber()
751751
<< " '" << FuncInfo->MBB->getName() << "'\n");
752752

@@ -805,7 +805,7 @@ void SelectionDAGISel::DoInstructionSelection() {
805805
CurDAG->setRoot(Dummy.getValue());
806806
}
807807

808-
DEBUG(errs() << "===== Instruction selection ends:\n");
808+
DEBUG(dbgs() << "===== Instruction selection ends:\n");
809809

810810
PostprocessISelDAG();
811811
}
@@ -1780,7 +1780,7 @@ UpdateChainsAndGlue(SDNode *NodeToMatch, SDValue InputChain,
17801780
if (!NowDeadNodes.empty())
17811781
CurDAG->RemoveDeadNodes(NowDeadNodes);
17821782

1783-
DEBUG(errs() << "ISEL: Match complete!\n");
1783+
DEBUG(dbgs() << "ISEL: Match complete!\n");
17841784
}
17851785

17861786
enum ChainResult {
@@ -2285,9 +2285,9 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
22852285
SmallVector<SDNode*, 3> ChainNodesMatched;
22862286
SmallVector<SDNode*, 3> GlueResultNodesMatched;
22872287

2288-
DEBUG(errs() << "ISEL: Starting pattern match on root node: ";
2288+
DEBUG(dbgs() << "ISEL: Starting pattern match on root node: ";
22892289
NodeToMatch->dump(CurDAG);
2290-
errs() << '\n');
2290+
dbgs() << '\n');
22912291

22922292
// Determine where to start the interpreter. Normally we start at opcode #0,
22932293
// but if the state machine starts with an OPC_SwitchOpcode, then we
@@ -2299,7 +2299,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
22992299
// Already computed the OpcodeOffset table, just index into it.
23002300
if (N.getOpcode() < OpcodeOffset.size())
23012301
MatcherIndex = OpcodeOffset[N.getOpcode()];
2302-
DEBUG(errs() << " Initial Opcode index to " << MatcherIndex << "\n");
2302+
DEBUG(dbgs() << " Initial Opcode index to " << MatcherIndex << "\n");
23032303

23042304
} else if (MatcherTable[0] == OPC_SwitchOpcode) {
23052305
// Otherwise, the table isn't computed, but the state machine does start
@@ -2366,7 +2366,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
23662366
if (!Result)
23672367
break;
23682368

2369-
DEBUG(errs() << " Skipped scope entry (due to false predicate) at "
2369+
DEBUG(dbgs() << " Skipped scope entry (due to false predicate) at "
23702370
<< "index " << MatcherIndexOfPredicate
23712371
<< ", continuing at " << FailIndex << "\n");
23722372
++NumDAGIselRetries;
@@ -2496,7 +2496,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
24962496
if (CaseSize == 0) break;
24972497

24982498
// Otherwise, execute the case we found.
2499-
DEBUG(errs() << " OpcodeSwitch from " << SwitchStart
2499+
DEBUG(dbgs() << " OpcodeSwitch from " << SwitchStart
25002500
<< " to " << MatcherIndex << "\n");
25012501
continue;
25022502
}
@@ -2528,7 +2528,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
25282528
if (CaseSize == 0) break;
25292529

25302530
// Otherwise, execute the case we found.
2531-
DEBUG(errs() << " TypeSwitch[" << EVT(CurNodeVT).getEVTString()
2531+
DEBUG(dbgs() << " TypeSwitch[" << EVT(CurNodeVT).getEVTString()
25322532
<< "] from " << SwitchStart << " to " << MatcherIndex<<'\n');
25332533
continue;
25342534
}
@@ -2872,9 +2872,9 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
28722872
->setMemRefs(MemRefs, MemRefs + NumMemRefs);
28732873
}
28742874

2875-
DEBUG(errs() << " "
2875+
DEBUG(dbgs() << " "
28762876
<< (Opcode == OPC_MorphNodeTo ? "Morphed" : "Created")
2877-
<< " node: "; Res->dump(CurDAG); errs() << "\n");
2877+
<< " node: "; Res->dump(CurDAG); dbgs() << "\n");
28782878

28792879
// If this was a MorphNodeTo then we're completely done!
28802880
if (Opcode == OPC_MorphNodeTo) {
@@ -2949,7 +2949,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
29492949
// If the code reached this point, then the match failed. See if there is
29502950
// another child to try in the current 'Scope', otherwise pop it until we
29512951
// find a case to check.
2952-
DEBUG(errs() << " Match failed at index " << CurrentOpcodeIndex << "\n");
2952+
DEBUG(dbgs() << " Match failed at index " << CurrentOpcodeIndex << "\n");
29532953
++NumDAGIselRetries;
29542954
while (1) {
29552955
if (MatchScopes.empty()) {
@@ -2969,7 +2969,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
29692969
MatchedMemRefs.resize(LastScope.NumMatchedMemRefs);
29702970
MatcherIndex = LastScope.FailIndex;
29712971

2972-
DEBUG(errs() << " Continuing at " << MatcherIndex << "\n");
2972+
DEBUG(dbgs() << " Continuing at " << MatcherIndex << "\n");
29732973

29742974
InputChain = LastScope.InputChain;
29752975
InputGlue = LastScope.InputGlue;

0 commit comments

Comments
 (0)