[llvm] r259121 - [PlaceSafepoints] Use DEBUG() instead of TraceLSP
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 28 15:49:27 PST 2016
Author: sanjoy
Date: Thu Jan 28 17:49:27 2016
New Revision: 259121
URL: http://llvm.org/viewvc/llvm-project?rev=259121&view=rev
Log:
[PlaceSafepoints] Use DEBUG() instead of TraceLSP
DEBUG() is the more idiomatic LLVM style.
Modified:
llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp?rev=259121&r1=259120&r2=259121&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp Thu Jan 28 17:49:27 2016
@@ -95,9 +95,6 @@ static cl::opt<int> CountedLoopTripWidth
static cl::opt<bool> SplitBackedge("spp-split-backedge", cl::Hidden,
cl::init(false));
-// Print tracing output
-static cl::opt<bool> TraceLSP("spp-trace", cl::Hidden, cl::init(false));
-
namespace {
/// An analysis pass whose purpose is to identify each of the backedges in
@@ -320,8 +317,7 @@ bool PlaceBackedgeSafepointsImpl::runOnL
// avoiding the runtime cost of the actual safepoint.
if (!AllBackedges) {
if (mustBeFiniteCountedLoop(L, SE, Pred)) {
- if (TraceLSP)
- errs() << "skipping safepoint placement in finite loop\n";
+ DEBUG(dbgs() << "skipping safepoint placement in finite loop\n");
FiniteExecution++;
continue;
}
@@ -330,8 +326,7 @@ bool PlaceBackedgeSafepointsImpl::runOnL
// Note: This is only semantically legal since we won't do any further
// IPO or inlining before the actual call insertion.. If we hadn't, we
// might latter loose this call safepoint.
- if (TraceLSP)
- errs() << "skipping safepoint placement due to unconditional call\n";
+ DEBUG(dbgs() << "skipping safepoint placement due to unconditional call\n");
CallInLoop++;
continue;
}
@@ -347,10 +342,7 @@ bool PlaceBackedgeSafepointsImpl::runOnL
// variables) and branches to the true header
TerminatorInst *Term = Pred->getTerminator();
- if (TraceLSP) {
- errs() << "[LSP] terminator instruction: ";
- Term->dump();
- }
+ DEBUG(dbgs() << "[LSP] terminator instruction: " << *Term);
PollLocations.push_back(Term);
}
More information about the llvm-commits
mailing list