Skip to content

Commit fff8f03

Browse files
[polly] Use DenseMap::insert_range (NFC) (#133657)
1 parent 2fc08d4 commit fff8f03

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

polly/include/polly/CodeGen/IRBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ScopAnnotator {
7979
void addAlternativeAliasBases(
8080
llvm::DenseMap<llvm::AssertingVH<llvm::Value>,
8181
llvm::AssertingVH<llvm::Value>> &NewMap) {
82-
AlternativeAliasBases.insert(NewMap.begin(), NewMap.end());
82+
AlternativeAliasBases.insert_range(NewMap);
8383
}
8484

8585
/// Delete the set of alternative alias bases

polly/lib/CodeGen/BlockGenerators.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ Value *BlockGenerator::trySynthesizeNewValue(ScopStmt &Stmt, Value *Old,
7676
return nullptr;
7777

7878
ValueMapT VTV;
79-
VTV.insert(BBMap.begin(), BBMap.end());
80-
VTV.insert(GlobalMap.begin(), GlobalMap.end());
79+
VTV.insert_range(BBMap);
80+
VTV.insert_range(GlobalMap);
8181

8282
Scop &S = *Stmt.getParent();
8383
const DataLayout &DL = S.getFunction().getDataLayout();
@@ -1131,7 +1131,7 @@ void RegionGenerator::copyStmt(ScopStmt &Stmt, LoopToScevMapT &LTS,
11311131

11321132
// Remember value in case it is visible after this subregion.
11331133
if (isDominatingSubregionExit(DT, R, BB))
1134-
ValueMap.insert(RegionMap.begin(), RegionMap.end());
1134+
ValueMap.insert_range(RegionMap);
11351135
}
11361136

11371137
// Now create a new dedicated region exit block and add it to the region map.
@@ -1164,7 +1164,7 @@ void RegionGenerator::copyStmt(ScopStmt &Stmt, LoopToScevMapT &LTS,
11641164
Instruction *BICopy = BBCopyEnd->getTerminator();
11651165

11661166
ValueMapT &RegionMap = RegionMaps[BBCopyStart];
1167-
RegionMap.insert(StartBlockMap.begin(), StartBlockMap.end());
1167+
RegionMap.insert_range(StartBlockMap);
11681168

11691169
Builder.SetInsertPoint(BICopy);
11701170
copyInstScalar(Stmt, TI, RegionMap, LTS);

polly/lib/CodeGen/IslNodeBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ void IslNodeBuilder::createUser(__isl_take isl_ast_node *User) {
895895
Id = isl_ast_expr_get_id(StmtExpr);
896896
isl_ast_expr_free(StmtExpr);
897897

898-
LTS.insert(OutsideLoopIterations.begin(), OutsideLoopIterations.end());
898+
LTS.insert_range(OutsideLoopIterations);
899899

900900
Stmt = (ScopStmt *)isl_id_get_user(Id);
901901
auto *NewAccesses = createNewAccesses(Stmt, User);

0 commit comments

Comments
 (0)