[llvm] r347826 - NFC. Use unsigned type for uses counter in CaptureTracking
Artur Pilipenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 28 18:15:35 PST 2018
Author: apilipenko
Date: Wed Nov 28 18:15:35 2018
New Revision: 347826
URL: http://llvm.org/viewvc/llvm-project?rev=347826&view=rev
Log:
NFC. Use unsigned type for uses counter in CaptureTracking
Modified:
llvm/trunk/lib/Analysis/CaptureTracking.cpp
Modified: llvm/trunk/lib/Analysis/CaptureTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CaptureTracking.cpp?rev=347826&r1=347825&r2=347826&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CaptureTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/CaptureTracking.cpp Wed Nov 28 18:15:35 2018
@@ -210,7 +210,7 @@ bool llvm::PointerMayBeCapturedBefore(co
/// TODO: Write a new FunctionPass AliasAnalysis so that it can keep
/// a cache. Then we can move the code from BasicAliasAnalysis into
/// that path, and remove this threshold.
-static int const Threshold = 20;
+static unsigned const Threshold = 20;
void llvm::PointerMayBeCaptured(const Value *V, CaptureTracker *Tracker) {
assert(V->getType()->isPointerTy() && "Capture is for pointers only!");
@@ -218,7 +218,7 @@ void llvm::PointerMayBeCaptured(const Va
SmallSet<const Use *, Threshold> Visited;
auto AddUses = [&](const Value *V) {
- int Count = 0;
+ unsigned Count = 0;
for (const Use &U : V->uses()) {
// If there are lots of uses, conservatively say that the value
// is captured to avoid taking too much compile time.
More information about the llvm-commits
mailing list