[polly] r270411 - Simplify BlockGenerator::handleOutsideUsers interface [NFC]
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon May 23 02:14:14 PDT 2016
Author: jdoerfert
Date: Mon May 23 04:14:07 2016
New Revision: 270411
URL: http://llvm.org/viewvc/llvm-project?rev=270411&view=rev
Log:
Simplify BlockGenerator::handleOutsideUsers interface [NFC]
Modified:
polly/trunk/include/polly/CodeGen/BlockGenerators.h
polly/trunk/lib/CodeGen/BlockGenerators.cpp
Modified: polly/trunk/include/polly/CodeGen/BlockGenerators.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/BlockGenerators.h?rev=270411&r1=270410&r2=270411&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/BlockGenerators.h (original)
+++ polly/trunk/include/polly/CodeGen/BlockGenerators.h Mon May 23 04:14:07 2016
@@ -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.
///
Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=270411&r1=270410&r2=270411&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Mon May 23 04:14:07 2016
@@ -363,14 +363,14 @@ Value *BlockGenerator::getOrCreatePHIAll
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(
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(Sc
if (!R.contains(Inst))
continue;
- handleOutsideUsers(R, Inst, nullptr);
+ handleOutsideUsers(S, Inst);
}
}
More information about the llvm-commits
mailing list