summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-05-23 09:14:07 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-05-23 09:14:07 +0000
commit38a012c46b50114863c1f773cd5ead688b13989f (patch)
tree1beea953733ba03544f11f6a5f7ac6db168add91
parent1dafea411439edff6339c95af25c1a52bde9f243 (diff)
downloadbcm5719-llvm-38a012c46b50114863c1f773cd5ead688b13989f.tar.gz
bcm5719-llvm-38a012c46b50114863c1f773cd5ead688b13989f.zip
Simplify BlockGenerator::handleOutsideUsers interface [NFC]
llvm-svn: 270411
-rw-r--r--polly/include/polly/CodeGen/BlockGenerators.h6
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp8
2 files changed, 6 insertions, 8 deletions
diff --git a/polly/include/polly/CodeGen/BlockGenerators.h b/polly/include/polly/CodeGen/BlockGenerators.h
index 972df671665..fc6c91adee9 100644
--- a/polly/include/polly/CodeGen/BlockGenerators.h
+++ b/polly/include/polly/CodeGen/BlockGenerators.h
@@ -386,11 +386,9 @@ protected:
/// @brief Handle users of @p Inst outside the SCoP.
///
- /// @param R The current SCoP region.
+ /// @param S The current SCoP.
/// @param Inst The current instruction we check.
- /// @param Address If given it is used as the escape address for @p Inst.
- void handleOutsideUsers(const Region &R, Instruction *Inst,
- Value *Address = nullptr);
+ void handleOutsideUsers(const Scop &S, Instruction *Inst);
/// @brief Find scalar statements that have outside users.
///
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index ae6b303832a..79d6d0b8464 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -363,14 +363,14 @@ Value *BlockGenerator::getOrCreatePHIAlloca(Value *ScalarBase) {
return getOrCreateAlloca(ScalarBase, PHIOpMap, ".phiops");
}
-void BlockGenerator::handleOutsideUsers(const Region &R, Instruction *Inst,
- Value *Address) {
+void BlockGenerator::handleOutsideUsers(const Scop &S, Instruction *Inst) {
// If there are escape users we get the alloca for this instruction and put it
// in the EscapeMap for later finalization. Lastly, if the instruction was
// copied multiple times we already did this and can exit.
if (EscapeMap.count(Inst))
return;
+ const auto &R = S.getRegion();
EscapeUserVectorTy EscapeUsers;
for (User *U : Inst->users()) {
@@ -390,7 +390,7 @@ void BlockGenerator::handleOutsideUsers(const Region &R, Instruction *Inst,
return;
// Get or create an escape alloca for this instruction.
- auto *ScalarAddr = Address ? Address : getOrCreateScalarAlloca(Inst);
+ auto *ScalarAddr = getOrCreateScalarAlloca(Inst);
// Remember that this instruction has escape uses and the escape alloca.
EscapeMap[Inst] = std::make_pair(ScalarAddr, std::move(EscapeUsers));
@@ -578,7 +578,7 @@ void BlockGenerator::findOutsideUsers(Scop &S) {
if (!R.contains(Inst))
continue;
- handleOutsideUsers(R, Inst, nullptr);
+ handleOutsideUsers(S, Inst);
}
}
OpenPOWER on IntegriCloud