[polly] r282861 - [CodeGen] Change 'Scalar' to 'Array' in method names. NFC.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 07:34:05 PDT 2016
Author: meinersbur
Date: Fri Sep 30 09:34:05 2016
New Revision: 282861
URL: http://llvm.org/viewvc/llvm-project?rev=282861&view=rev
Log:
[CodeGen] Change 'Scalar' to 'Array' in method names. NFC.
generateScalarLoad() and generateScalarStore() are used for explicit (MK_Array)
memory accesses, therefore the method names were misleading. The names also
were similar to generateScalarLoads() and generateScalarStores() (plural forms)
which indeed handle scalar accesses. Presumbly, they were originally named to
contrast VectorBlockGenerator::generateLoad().
Rename the two methods to generateArrayLoad(),
respectively generateArrayStore().
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=282861&r1=282860&r2=282861&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/BlockGenerators.h (original)
+++ polly/trunk/include/polly/CodeGen/BlockGenerators.h Fri Sep 30 09:34:05 2016
@@ -545,16 +545,15 @@ protected:
/// @param NewAccesses A map from memory access ids to new ast expressions,
/// which may contain new access expressions for certain
/// memory accesses.
- Value *generateScalarLoad(ScopStmt &Stmt, LoadInst *load, ValueMapT &BBMap,
- LoopToScevMapT <S,
- isl_id_to_ast_expr *NewAccesses);
+ Value *generateArrayLoad(ScopStmt &Stmt, LoadInst *load, ValueMapT &BBMap,
+ LoopToScevMapT <S,
+ isl_id_to_ast_expr *NewAccesses);
/// @param NewAccesses A map from memory access ids to new ast expressions,
/// which may contain new access expressions for certain
/// memory accesses.
- void generateScalarStore(ScopStmt &Stmt, StoreInst *store, ValueMapT &BBMap,
- LoopToScevMapT <S,
- isl_id_to_ast_expr *NewAccesses);
+ void generateArrayStore(ScopStmt &Stmt, StoreInst *store, ValueMapT &BBMap,
+ LoopToScevMapT <S, isl_id_to_ast_expr *NewAccesses);
/// Copy a single PHI instruction.
///
Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=282861&r1=282860&r2=282861&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Fri Sep 30 09:34:05 2016
@@ -229,9 +229,9 @@ Loop *BlockGenerator::getLoopForStmt(con
return LI.getLoopFor(StmtBB);
}
-Value *BlockGenerator::generateScalarLoad(ScopStmt &Stmt, LoadInst *Load,
- ValueMapT &BBMap, LoopToScevMapT <S,
- isl_id_to_ast_expr *NewAccesses) {
+Value *BlockGenerator::generateArrayLoad(ScopStmt &Stmt, LoadInst *Load,
+ ValueMapT &BBMap, LoopToScevMapT <S,
+ isl_id_to_ast_expr *NewAccesses) {
if (Value *PreloadLoad = GlobalMap.lookup(Load))
return PreloadLoad;
@@ -247,9 +247,9 @@ Value *BlockGenerator::generateScalarLoa
return ScalarLoad;
}
-void BlockGenerator::generateScalarStore(ScopStmt &Stmt, StoreInst *Store,
- ValueMapT &BBMap, LoopToScevMapT <S,
- isl_id_to_ast_expr *NewAccesses) {
+void BlockGenerator::generateArrayStore(ScopStmt &Stmt, StoreInst *Store,
+ ValueMapT &BBMap, LoopToScevMapT <S,
+ isl_id_to_ast_expr *NewAccesses) {
Value *NewPointer =
generateLocationAccessed(Stmt, Store, BBMap, LTS, NewAccesses);
Value *ValueOperand = getNewValue(Stmt, Store->getValueOperand(), BBMap, LTS,
@@ -281,7 +281,7 @@ void BlockGenerator::copyInstruction(Sco
return;
if (auto *Load = dyn_cast<LoadInst>(Inst)) {
- Value *NewLoad = generateScalarLoad(Stmt, Load, BBMap, LTS, NewAccesses);
+ Value *NewLoad = generateArrayLoad(Stmt, Load, BBMap, LTS, NewAccesses);
// Compute NewLoad before its insertion in BBMap to make the insertion
// deterministic.
BBMap[Load] = NewLoad;
@@ -289,7 +289,7 @@ void BlockGenerator::copyInstruction(Sco
}
if (auto *Store = dyn_cast<StoreInst>(Inst)) {
- generateScalarStore(Stmt, Store, BBMap, LTS, NewAccesses);
+ generateArrayStore(Stmt, Store, BBMap, LTS, NewAccesses);
return;
}
@@ -845,7 +845,7 @@ void VectorBlockGenerator::generateLoad(
if (!VectorType::isValidElementType(Load->getType())) {
for (int i = 0; i < getVectorWidth(); i++)
ScalarMaps[i][Load] =
- generateScalarLoad(Stmt, Load, ScalarMaps[i], VLTS[i], NewAccesses);
+ generateArrayLoad(Stmt, Load, ScalarMaps[i], VLTS[i], NewAccesses);
return;
}
More information about the llvm-commits
mailing list