This is an archive of the discontinued LLVM Phabricator instance.

Don't add irrelevant items to queue in DwarfCompileUnit::createScopeChildrenDIE (NFC)
ClosedPublic

Authored by aaronpuchert on Nov 14 2021, 2:31 PM.

Details

Summary

Instead of popping them and then immediately throwing them away, we can
just filter out globals and items in different scopes before adding them
to WorkList. Shouldn't change anything but keep the queue smaller.

Diff Detail

Event Timeline

aaronpuchert created this revision.Nov 14 2021, 2:31 PM
aaronpuchert requested review of this revision.Nov 14 2021, 2:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2021, 2:31 PM

Also use the non-modifying DenseMapBase::lookup instead of operator[].

aprantl accepted this revision.Nov 16 2021, 12:03 PM

Seems reasonable.

This revision is now accepted and ready to land.Nov 16 2021, 12:03 PM