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
11231123
11241124 // Helper methods for dealing with shader stage bitmap
11251125 void AddToScannedFunctions (const FunctionDecl *FD) {
1126- unsigned &ScannedStages = ScannedDecls. getOrInsertDefault (FD) ;
1126+ unsigned &ScannedStages = ScannedDecls[FD] ;
11271127 ScannedStages |= CurrentShaderStageBit;
11281128 }
11291129
1130- unsigned GetScannedStages (const FunctionDecl *FD) {
1131- return ScannedDecls.getOrInsertDefault (FD);
1132- }
1130+ unsigned GetScannedStages (const FunctionDecl *FD) { return ScannedDecls[FD]; }
11331131
11341132 bool WasAlreadyScannedInCurrentStage (const FunctionDecl *FD) {
11351133 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) {
103103 if (scopeNames.contains (func))
104104 return ;
105105
106- auto &scopeMap = scopeNames. getOrInsertDefault ( func) ;
107- auto &scopeOps = sortedScopeOperations. getOrInsertDefault ( func) ;
106+ auto &scopeMap = scopeNames[ func] ;
107+ auto &scopeOps = sortedScopeOperations[ func] ;
108108 func.walk ([&](fir::DummyScopeOp op) { scopeOps.push_back (op); });
109109 llvm::stable_sort (scopeOps, [&](const fir::DummyScopeOp &op1,
110110 const fir::DummyScopeOp &op2) {
Original file line number Diff line number Diff line change @@ -322,13 +322,15 @@ class DenseMapBase : public DebugEpochBase {
322322 // / Returns the value associated to the key in the map if it exists. If it
323323 // / does not exist, emplace a default value for the key and returns a
324324 // / reference to the newly created value.
325+ LLVM_DEPRECATED (" Use operator[] instead" , " [Key]" )
325326 ValueT &getOrInsertDefault (KeyT &&Key) {
326327 return try_emplace (Key).first ->second ;
327328 }
328329
329330 // / Returns the value associated to the key in the map if it exists. If it
330331 // / does not exist, emplace a default value for the key and returns a
331332 // / reference to the newly created value.
333+ LLVM_DEPRECATED (" Use operator[] instead" , " [Key]" )
332334 ValueT &getOrInsertDefault (const KeyT &Key) {
333335 return try_emplace (Key).first ->second ;
334336 }
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ computeDestructuringInfo(DestructurableMemorySlot &slot,
5757
5858 auto scheduleAsBlockingUse = [&](OpOperand &use) {
5959 SmallPtrSetImpl<OpOperand *> &blockingUses =
60- info.userToBlockingUses . getOrInsertDefault ( use.getOwner ()) ;
60+ info.userToBlockingUses [ use.getOwner ()] ;
6161 blockingUses.insert (&use);
6262 };
6363
@@ -122,7 +122,7 @@ computeDestructuringInfo(DestructurableMemorySlot &slot,
122122 assert (llvm::is_contained (user->getResults (), blockingUse->get ()));
123123
124124 SmallPtrSetImpl<OpOperand *> &newUserBlockingUseSet =
125- info.userToBlockingUses . getOrInsertDefault ( blockingUse->getOwner ()) ;
125+ info.userToBlockingUses [ blockingUse->getOwner ()] ;
126126 newUserBlockingUseSet.insert (blockingUse);
127127 }
128128 }
You can’t perform that action at this time.
0 commit comments