summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-04-10 22:16:58 +0000
committerPhilip Reames <listmail@philipreames.com>2015-04-10 22:16:58 +0000
commitf66d73708bace05a5436985d8954da027068982f (patch)
tree05f6fe91c0dbc201a6b7cfca931782ce796afe6d /llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
parent27aa9b4028f7841c4efc8d7541c830ba2250c810 (diff)
downloadbcm5719-llvm-f66d73708bace05a5436985d8954da027068982f.tar.gz
bcm5719-llvm-f66d73708bace05a5436985d8954da027068982f.zip
[RewriteStatepointsForGC] Missed review comment from 234651 & build fix
After submitting 234651, I noticed I hadn't responded to a review comment by mjacob. This patch addresses that comment and fixes a Release only build problem due to an unused variable. llvm-svn: 234653
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index a817c8db91b..d0f2381e87b 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -382,6 +382,7 @@ static Value *findBaseDefiningValue(Value *I) {
if (auto *EEI = dyn_cast<ExtractElementInst>(I)) {
Value *VectorOperand = EEI->getVectorOperand();
Value *VectorBase = findBaseOfVector(VectorOperand);
+ (void)VectorBase;
assert(VectorBase && "extract element not known to be a trivial base");
return EEI;
}
@@ -2060,14 +2061,14 @@ bool RewriteStatepointsForGC::runOnFunction(Function &F) {
// consider those in reachable code since we need to ask dominance queries
// when rewriting. We'll delete the unreachable ones in a moment.
SmallVector<CallSite, 64> ParsePointNeeded;
- SmallVector<CallSite, 16> UnreachableStatepoints;
+ bool HasUnreachableStatepoint = false;
for (Instruction &I : inst_range(F)) {
// TODO: only the ones with the flag set!
if (isStatepoint(I)) {
if (DT.isReachableFromEntry(I.getParent()))
ParsePointNeeded.push_back(CallSite(&I));
else
- UnreachableStatepoints.push_back(CallSite(&I));
+ HasUnreachableStatepoint = true;
}
}
@@ -2077,7 +2078,7 @@ bool RewriteStatepointsForGC::runOnFunction(Function &F) {
// statepoints surviving this pass. This makes testing easier and the
// resulting IR less confusing to human readers. Rather than be fancy, we
// just reuse a utility function which removes the unreachable blocks.
- if (!UnreachableStatepoints.empty())
+ if (HasUnreachableStatepoint)
MadeChange |= removeUnreachableBlocks(F);
// Return early if no work to do.
OpenPOWER on IntegriCloud