[CodeGen] Simplify code with *Map::operator[] (NFC) (#112075)

This commit is contained in:
Kazu Hirata 2024-10-11 23:01:21 -07:00 committed by GitHub
parent 79d695f049
commit a62768c427
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -630,8 +630,7 @@ static void finishCallSiteParams(ValT Val, const DIExpression *Expr,
static void addToFwdRegWorklist(FwdRegWorklist &Worklist, unsigned Reg,
const DIExpression *Expr,
ArrayRef<FwdRegParamInfo> ParamsToAdd) {
auto I = Worklist.insert({Reg, {}});
auto &ParamsForFwdReg = I.first->second;
auto &ParamsForFwdReg = Worklist[Reg];
for (auto Param : ParamsToAdd) {
assert(none_of(ParamsForFwdReg,
[Param](const FwdRegParamInfo &D) {

View File

@ -120,8 +120,7 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
for (WinEHTryBlockMapEntry &TBME : EHInfo.TryBlockMap) {
for (WinEHHandlerType &H : TBME.HandlerArray) {
if (const AllocaInst *AI = H.CatchObj.Alloca)
CatchObjects.insert({AI, {}}).first->second.push_back(
&H.CatchObj.FrameIndex);
CatchObjects[AI].push_back(&H.CatchObj.FrameIndex);
else
H.CatchObj.FrameIndex = INT_MAX;
}