summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-06-26 04:55:32 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-06-26 04:55:32 +0000
commit61c76e3b897cef4eff16e6930125bbd754e56996 (patch)
tree45c9fb6051b4c3907fdd7e7cb4820d5fe83f0cdc /llvm/lib/Transforms
parent83186b067d6bb01ae62113882957521227f83fa1 (diff)
downloadbcm5719-llvm-61c76e3b897cef4eff16e6930125bbd754e56996.tar.gz
bcm5719-llvm-61c76e3b897cef4eff16e6930125bbd754e56996.zip
[RSForGC] Bring computeLiveInValues up to code; NFC
llvm-svn: 273799
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index ccb3bbbc659..c1e4ea779c4 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -2371,15 +2371,12 @@ bool RewriteStatepointsForGC::runOnFunction(Function &F) {
/// Compute the live-in set for the location rbegin starting from
/// the live-out set of the basic block
-static void computeLiveInValues(BasicBlock::reverse_iterator rbegin,
- BasicBlock::reverse_iterator rend,
+static void computeLiveInValues(BasicBlock::reverse_iterator Begin,
+ BasicBlock::reverse_iterator End,
SetVector<Value *> &LiveTmp) {
-
- for (BasicBlock::reverse_iterator ritr = rbegin; ritr != rend; ritr++) {
- Instruction *I = &*ritr;
-
+ for (auto &I : make_range(Begin, End)) {
// KILL/Def - Remove this definition from LiveIn
- LiveTmp.remove(I);
+ LiveTmp.remove(&I);
// Don't consider *uses* in PHI nodes, we handle their contribution to
// predecessor blocks when we seed the LiveOut sets
@@ -2387,7 +2384,7 @@ static void computeLiveInValues(BasicBlock::reverse_iterator rbegin,
continue;
// USE - Add to the LiveIn set for this instruction
- for (Value *V : I->operands()) {
+ for (Value *V : I.operands()) {
assert(!isUnhandledGCPointerType(V->getType()) &&
"support for FCA unimplemented");
if (isHandledGCPointerType(V->getType()) && !isa<Constant>(V)) {
OpenPOWER on IntegriCloud