Skip to content

Commit 4730a33

Browse files
committed
Edit debug messages in SILCombine
1 parent 883968c commit 4730a33

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/SILOptimizer/SILCombiner/SILCombine.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,12 @@ bool SILCombiner::doOneIteration(SILFunction &F, unsigned Iteration) {
421421
MadeChange = true;
422422
continue;
423423
}
424+
#ifndef NDEBUG
425+
std::string OrigIStr;
426+
#endif
427+
LLVM_DEBUG(llvm::raw_string_ostream SS(OrigIStr); I->print(SS);
428+
OrigIStr = SS.str(););
429+
LLVM_DEBUG(llvm::dbgs() << "SC: Visiting: " << OrigIStr << '\n');
424430

425431
// Canonicalize the instruction.
426432
if (scCanonicalize.tryCanonicalize(I)) {
@@ -457,13 +463,6 @@ bool SILCombiner::doOneIteration(SILFunction &F, unsigned Iteration) {
457463
// Then begin... SILCombine.
458464
Builder.setInsertionPoint(I);
459465

460-
#ifndef NDEBUG
461-
std::string OrigIStr;
462-
#endif
463-
LLVM_DEBUG(llvm::raw_string_ostream SS(OrigIStr); I->print(SS);
464-
OrigIStr = SS.str(););
465-
LLVM_DEBUG(llvm::dbgs() << "SC: Visiting: " << OrigIStr << '\n');
466-
467466
SILInstruction *currentInst = I;
468467
if (SILInstruction *Result = visit(I)) {
469468
++NumCombined;

0 commit comments

Comments
 (0)