diff options
Diffstat (limited to 'llvm/lib/Analysis/CodeMetrics.cpp')
-rw-r--r-- | llvm/lib/Analysis/CodeMetrics.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/CodeMetrics.cpp b/llvm/lib/Analysis/CodeMetrics.cpp index 157811c..b0b46cb 100644 --- a/llvm/lib/Analysis/CodeMetrics.cpp +++ b/llvm/lib/Analysis/CodeMetrics.cpp @@ -73,9 +73,7 @@ void CodeMetrics::collectEphemeralValues( SmallVector<const Value *, 16> Worklist; for (auto &AssumeVH : AC->assumptions()) { - if (!AssumeVH) - continue; - Instruction *I = cast<Instruction>(AssumeVH); + Instruction *I = AssumeVH.getAssumeCI(); // Filter out call sites outside of the loop so we don't do a function's // worth of work for each of its loops (and, in the common case, ephemeral @@ -97,9 +95,7 @@ void CodeMetrics::collectEphemeralValues( SmallVector<const Value *, 16> Worklist; for (auto &AssumeVH : AC->assumptions()) { - if (!AssumeVH) - continue; - Instruction *I = cast<Instruction>(AssumeVH); + Instruction *I = AssumeVH.getAssumeCI(); assert(I->getParent()->getParent() == F && "Found assumption for the wrong function!"); |