message: loop-fusion: debug info cleanup
diff: @@ -832,12 +832,15 @@ static bool isFusionProfitable(OperationInst *srcOpInst,
  ArrayRef<OperationInst *> dstOpInsts,
  ComputationSliceState *sliceState,
  unsigned *dstLoopDepth) {
  - LLVM_DEBUG(llvm::dbgs() << "Checking whether fusion is profitable between:\n";
  - llvm::dbgs() << " "; srcOpInst->dump(); llvm::dbgs() << " and \n";
  - for (auto dstOpInst
  - : dstOpInsts) {
  + LLVM_DEBUG({
  + llvm::dbgs() << "Checking whether fusion is profitable between:\n";
  + llvm::dbgs() << " ";
  + srcOpInst->dump();
  + llvm::dbgs() << " and \n";
  + for (auto dstOpInst : dstOpInsts) {
  llvm::dbgs() << " ";
  dstOpInst->dump();
  + };
  });
  // Compute cost of sliced and unsliced src loop nest.
  @@ -963,7 +966,7 @@ static bool isFusionProfitable(OperationInst *srcOpInst,
  double storageReduction =
  static_cast<double>(srcLoopNestCost) / sliceIterationCount;
  - LLVM_DEBUG(
  + LLVM_DEBUG({
  std::stringstream msg;
  msg << " evaluating fusion profitability at depth : " << i << "\n"
  << std::setprecision(2) << " additional compute fraction: "
  @@ -971,7 +974,8 @@ static bool isFusionProfitable(OperationInst *srcOpInst,
  << " storage reduction factor: " << storageReduction << "x\n"
  << " fused nest cost: " << fusedLoopNestComputeCost << "\n"
  << " slice iteration count: " << sliceIterationCount << "\n";
  - llvm::dbgs() << msg.str());
  + llvm::dbgs() << msg.str();
  + });
  double computeToleranceThreshold =
  clFusionAddlComputeTolerance.getNumOccurrences() > 0
  @@ -1014,8 +1018,8 @@ static bool isFusionProfitable(OperationInst *srcOpInst,
  *dstLoopDepth = bestDstLoopDepth.getValue();
  LLVM_DEBUG(
  - llvm::dbgs() << " LoopFusion fusion stats:\n"
  - << "\n Best loop depth: " << bestDstLoopDepth
  + llvm::dbgs() << " LoopFusion fusion stats:"
  + << "\n best loop depth: " << bestDstLoopDepth
  << "\n src loop nest compute cost: " << srcLoopNestCost
  << "\n dst loop nest compute cost: " << dstLoopNestCost
  << "\n fused loop nest compute cost: "
  @@ -1060,6 +1064,7 @@ static bool isFusionProfitable(OperationInst *srcOpInst,
  (static_cast<double>(srcLoopNestCost) + dstLoopNestCost) -
  1);
  + LLVM_DEBUG({
  std::stringstream msg;
  msg << " fusion is most profitable at depth " << *dstLoopDepth << " with "
  << setprecision(2) << additionalComputeFraction
  @@ -1068,7 +1073,8 @@ static bool isFusionProfitable(OperationInst *srcOpInst,
  ? std::to_string(storageReduction.getValue())
  : "<unknown>");
  msg << "% storage reduction.\n";
  - LLVM_DEBUG(llvm::dbgs() << msg.str());
  + llvm::dbgs() << msg.str();
  + });
  // Update return parameter 'sliceState' with 'bestSliceState'.
  ComputationSliceState *bestSliceState = &sliceStates[*dstLoopDepth - 1];
  