From 0e10f1284455aaa54cbcad145238ecedd0d57e48 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 8 Jun 2022 15:45:21 +0800 Subject: [PATCH] [NFC] Remove commented cerr debugging loggings There are some unused cerr debugging loggings in the codes. It is weird to remain such commented debug helpers in the product. --- llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 2 -- llvm/lib/Analysis/PHITransAddr.cpp | 3 --- llvm/lib/CodeGen/CodeGenPrepare.cpp | 1 - llvm/lib/Transforms/IPO/GlobalOpt.cpp | 4 ---- llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | 1 - 5 files changed, 11 deletions(-) diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index 78383d5..690d575 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -734,8 +734,6 @@ MemoryDependenceResults::getNonLocalCallDependency(CallBase *QueryCall) { llvm::sort(Cache); ++NumCacheDirtyNonLocal; - // cerr << "CACHED CASE: " << DirtyBlocks.size() << " dirty: " - // << Cache.size() << " cached: " << *QueryInst; } else { // Seed DirtyBlocks with each of the preds of QueryInst's block. BasicBlock *QueryBB = QueryCall->getParent(); diff --git a/llvm/lib/Analysis/PHITransAddr.cpp b/llvm/lib/Analysis/PHITransAddr.cpp index 6e908bc..b78a85d 100644 --- a/llvm/lib/Analysis/PHITransAddr.cpp +++ b/llvm/lib/Analysis/PHITransAddr.cpp @@ -34,9 +34,6 @@ static bool CanPHITrans(Instruction *Inst) { isa(Inst->getOperand(1))) return true; - // cerr << "MEMDEP: Could not PHI translate: " << *Pointer; - // if (isa(PtrInst) || isa(PtrInst)) - // cerr << "OP:\t\t\t\t" << *PtrInst->getOperand(0); return false; } diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index aaf97066..339d4a3 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -4806,7 +4806,6 @@ bool AddressingModeMatcher::matchAddr(Value *Addr, unsigned Depth) { } // It isn't profitable to do this, roll back. - //cerr << "NOT FOLDING: " << *I; AddrMode = BackupAddrMode; AddrModeInsts.resize(OldSize); TPT.rollback(LastKnownGood); diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 1868273..dc286ea 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -608,17 +608,14 @@ static bool AllUsesOfValueWillTrapIfNull(const Value *V, // Will trap. } else if (const StoreInst *SI = dyn_cast(U)) { if (SI->getOperand(0) == V) { - //cerr << "NONTRAPPING USE: " << *U; return false; // Storing the value. } } else if (const CallInst *CI = dyn_cast(U)) { if (CI->getCalledOperand() != V) { - //cerr << "NONTRAPPING USE: " << *U; return false; // Not calling the ptr } } else if (const InvokeInst *II = dyn_cast(U)) { if (II->getCalledOperand() != V) { - //cerr << "NONTRAPPING USE: " << *U; return false; // Not calling the ptr } } else if (const BitCastInst *CI = dyn_cast(U)) { @@ -642,7 +639,6 @@ static bool AllUsesOfValueWillTrapIfNull(const Value *V, // the comparing of the value of the created global init bool later in // optimizeGlobalAddressOfAllocation for the global variable. } else { - //cerr << "NONTRAPPING USE: " << *U; return false; } } diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp index 683d197..cd03d6b 100644 --- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp @@ -1632,7 +1632,6 @@ Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) { NewS = Ext; const SCEV *V = cast(NewS)->evaluateAtIteration(IH, SE); - //cerr << "Evaluated: " << *this << "\n to: " << *V << "\n"; // Truncate the result down to the original type, if needed. const SCEV *T = SE.getTruncateOrNoop(V, Ty); -- 2.7.4