File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9662,14 +9662,14 @@ Constant *
9662
9662
ScalarEvolution::getConstantEvolutionLoopExitValue(PHINode *PN,
9663
9663
const APInt &BEs,
9664
9664
const Loop *L) {
9665
- auto I = ConstantEvolutionLoopExitValue.find (PN);
9666
- if (I != ConstantEvolutionLoopExitValue.end() )
9665
+ auto [I, Inserted] = ConstantEvolutionLoopExitValue.try_emplace (PN);
9666
+ if (!Inserted )
9667
9667
return I->second;
9668
9668
9669
9669
if (BEs.ugt(MaxBruteForceIterations))
9670
- return ConstantEvolutionLoopExitValue[PN] = nullptr; // Not going to evaluate it.
9670
+ return nullptr; // Not going to evaluate it.
9671
9671
9672
- Constant *&RetVal = ConstantEvolutionLoopExitValue[PN] ;
9672
+ Constant *&RetVal = I->second ;
9673
9673
9674
9674
DenseMap<Instruction *, Constant *> CurrentIterVals;
9675
9675
BasicBlock *Header = L->getHeader();
You can’t perform that action at this time.
0 commit comments