From: Johannes Doerfert Date: Tue, 28 Jan 2020 17:49:35 +0000 (-0600) Subject: [Attributor][NFC] Improve debug messages X-Git-Tag: 2020.06-alpha~221^2~303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02bd8180fc37037ac71575addd9c73ee001a4101;p=platform%2Fupstream%2Fllvm.git [Attributor][NFC] Improve debug messages --- diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index a0e60950232c..400e7127102f 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -2513,13 +2513,13 @@ struct AANoAliasCallSiteArgument final : AANoAliasImpl { // (i) Check whether noalias holds in the definition. auto &NoAliasAA = A.getAAFor(*this, IRP); - LLVM_DEBUG(dbgs() << "[Attributor][AANoAliasCSArg] check definition: " << V + LLVM_DEBUG(dbgs() << "[AANoAliasCSArg] check definition: " << V << " :: " << NoAliasAA << "\n"); if (!NoAliasAA.isAssumedNoAlias()) return indicatePessimisticFixpoint(); - LLVM_DEBUG(dbgs() << "[Attributor][AANoAliasCSArg] " << V + LLVM_DEBUG(dbgs() << "[AANoAliasCSArg] " << V << " is assumed NoAlias in the definition\n"); // (ii) Check whether the value is captured in the scope using AANoCapture. @@ -2529,7 +2529,7 @@ struct AANoAliasCallSiteArgument final : AANoAliasImpl { auto &NoCaptureAA = A.getAAFor(*this, IRP); if (!NoCaptureAA.isAssumedNoCaptureMaybeReturned()) { LLVM_DEBUG( - dbgs() << "[Attributor][AANoAliasCSArg] " << V + dbgs() << "[AANoAliasCSArg] " << V << " cannot be noalias as it is potentially captured\n"); return indicatePessimisticFixpoint(); } @@ -2549,7 +2549,7 @@ struct AANoAliasCallSiteArgument final : AANoAliasImpl { if (AAResults *AAR = A.getInfoCache().getAAResultsForFunction(*F)) { bool IsAliasing = !AAR->isNoAlias(&getAssociatedValue(), ArgOp); LLVM_DEBUG(dbgs() - << "[Attributor][NoAliasCSArg] Check alias between " + << "[NoAliasCSArg] Check alias between " "callsite arguments " << AAR->isNoAlias(&getAssociatedValue(), ArgOp) << " " << getAssociatedValue() << " " << *ArgOp << " => " @@ -4233,7 +4233,7 @@ struct AAValueSimplifyImpl : AAValueSimplify { if (AccumulatedSimplifiedValue.hasValue()) return AccumulatedSimplifiedValue == QueryingValueSimplified; - LLVM_DEBUG(dbgs() << "[Attributor][ValueSimplify] " << QueryingValue + LLVM_DEBUG(dbgs() << "[ValueSimplify] " << QueryingValue << " is assumed to be " << QueryingValueSimplifiedUnwrapped << "\n"); @@ -4275,8 +4275,8 @@ struct AAValueSimplifyImpl : AAValueSimplify { // We can replace the AssociatedValue with the constant. Value &V = getAssociatedValue(); if (!V.user_empty() && &V != C && V.getType() == C->getType()) { - LLVM_DEBUG(dbgs() << "[Attributor][ValueSimplify] " << V << " -> " << *C - << "\n"); + LLVM_DEBUG(dbgs() << "[ValueSimplify] " << V << " -> " << *C + << " :: " << *this << "\n"); A.changeValueAfterManifest(V, *C); Changed = ChangeStatus::CHANGED; } @@ -4408,9 +4408,8 @@ struct AAValueSimplifyFloating : AAValueSimplifyImpl { if (!Stripped && this == &AA) { // TODO: Look the instruction and check recursively. - LLVM_DEBUG( - dbgs() << "[Attributor][ValueSimplify] Can't be stripped more : " - << V << "\n"); + LLVM_DEBUG(dbgs() << "[ValueSimplify] Can't be stripped more : " << V + << "\n"); return false; } return checkAndUpdate(A, *this, V, SimplifiedAssociatedValue); @@ -5480,8 +5479,8 @@ struct AAValueConstantRangeFloating : AAValueConstantRangeImpl { // Otherwise we give up. indicatePessimisticFixpoint(); - LLVM_DEBUG(dbgs() << "[Attributor][AAValueConstantRange] We give up: " - << getAssociatedValue()); + LLVM_DEBUG(dbgs() << "[AAValueConstantRange] We give up: " + << getAssociatedValue() << "\n"); } bool calculateBinaryOperator(Attributor &A, BinaryOperator *BinOp,