diff options
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 6fb36fa..9dfe8fd 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -4313,9 +4313,8 @@ bool llvm::getUnderlyingObjectsForCodeGen(const Value *V, return true; } -AllocaInst * -llvm::findAllocaForValue(Value *V, - DenseMap<Value *, AllocaInst *> &AllocaForValue) { +static AllocaInst * +findAllocaForValue(Value *V, DenseMap<Value *, AllocaInst *> &AllocaForValue) { if (AllocaInst *AI = dyn_cast<AllocaInst>(V)) return AI; // See if we've already calculated (or started to calculate) alloca for a @@ -4348,6 +4347,11 @@ llvm::findAllocaForValue(Value *V, return Res; } +AllocaInst *llvm::findAllocaForValue(Value *V) { + DenseMap<Value *, AllocaInst *> AllocaForValue; + return ::findAllocaForValue(V, AllocaForValue); +} + static bool onlyUsedByLifetimeMarkersOrDroppableInstsHelper( const Value *V, bool AllowLifetime, bool AllowDroppable) { for (const User *U : V->users()) { |