File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
flang/lib/Optimizer/Transforms Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1123,13 +1123,11 @@ class DiagnoseHLSLAvailability
1123
1123
1124
1124
// Helper methods for dealing with shader stage bitmap
1125
1125
void AddToScannedFunctions (const FunctionDecl *FD) {
1126
- unsigned &ScannedStages = ScannedDecls. getOrInsertDefault (FD) ;
1126
+ unsigned &ScannedStages = ScannedDecls[FD] ;
1127
1127
ScannedStages |= CurrentShaderStageBit;
1128
1128
}
1129
1129
1130
- unsigned GetScannedStages (const FunctionDecl *FD) {
1131
- return ScannedDecls.getOrInsertDefault (FD);
1132
- }
1130
+ unsigned GetScannedStages (const FunctionDecl *FD) { return ScannedDecls[FD]; }
1133
1131
1134
1132
bool WasAlreadyScannedInCurrentStage (const FunctionDecl *FD) {
1135
1133
return WasAlreadyScannedInCurrentStage (GetScannedStages (FD));
Original file line number Diff line number Diff line change @@ -103,8 +103,8 @@ void PassState::processFunctionScopes(mlir::func::FuncOp func) {
103
103
if (scopeNames.contains (func))
104
104
return ;
105
105
106
- auto &scopeMap = scopeNames. getOrInsertDefault ( func) ;
107
- auto &scopeOps = sortedScopeOperations. getOrInsertDefault ( func) ;
106
+ auto &scopeMap = scopeNames[ func] ;
107
+ auto &scopeOps = sortedScopeOperations[ func] ;
108
108
func.walk ([&](fir::DummyScopeOp op) { scopeOps.push_back (op); });
109
109
llvm::stable_sort (scopeOps, [&](const fir::DummyScopeOp &op1,
110
110
const fir::DummyScopeOp &op2) {
Original file line number Diff line number Diff line change @@ -322,13 +322,15 @@ class DenseMapBase : public DebugEpochBase {
322
322
// / Returns the value associated to the key in the map if it exists. If it
323
323
// / does not exist, emplace a default value for the key and returns a
324
324
// / reference to the newly created value.
325
+ LLVM_DEPRECATED (" Use operator[] instead" , " [Key]" )
325
326
ValueT &getOrInsertDefault (KeyT &&Key) {
326
327
return try_emplace (Key).first ->second ;
327
328
}
328
329
329
330
// / Returns the value associated to the key in the map if it exists. If it
330
331
// / does not exist, emplace a default value for the key and returns a
331
332
// / reference to the newly created value.
333
+ LLVM_DEPRECATED (" Use operator[] instead" , " [Key]" )
332
334
ValueT &getOrInsertDefault (const KeyT &Key) {
333
335
return try_emplace (Key).first ->second ;
334
336
}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ computeDestructuringInfo(DestructurableMemorySlot &slot,
57
57
58
58
auto scheduleAsBlockingUse = [&](OpOperand &use) {
59
59
SmallPtrSetImpl<OpOperand *> &blockingUses =
60
- info.userToBlockingUses . getOrInsertDefault ( use.getOwner ()) ;
60
+ info.userToBlockingUses [ use.getOwner ()] ;
61
61
blockingUses.insert (&use);
62
62
};
63
63
@@ -122,7 +122,7 @@ computeDestructuringInfo(DestructurableMemorySlot &slot,
122
122
assert (llvm::is_contained (user->getResults (), blockingUse->get ()));
123
123
124
124
SmallPtrSetImpl<OpOperand *> &newUserBlockingUseSet =
125
- info.userToBlockingUses . getOrInsertDefault ( blockingUse->getOwner ()) ;
125
+ info.userToBlockingUses [ blockingUse->getOwner ()] ;
126
126
newUserBlockingUseSet.insert (blockingUse);
127
127
}
128
128
}
You can’t perform that action at this time.
0 commit comments