This is an archive of the discontinued LLVM Phabricator instance.

collectUsedGlobalVariables: migrate SmallPtrSetImpl overload to SmallVecImpl overload after D97128
ClosedPublic

Authored by MaskRay on Feb 22 2021, 10:32 PM.

Details

Summary

And delete the SmallPtrSetImpl overload.

While here, decrease inline element counts from 8 to 4. See D97128 for the choice.

Diff Detail

Event Timeline

MaskRay created this revision.Feb 22 2021, 10:32 PM
MaskRay requested review of this revision.Feb 22 2021, 10:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2021, 10:32 PM
tejohnson added inline comments.Feb 23 2021, 11:34 AM
llvm/lib/Object/IRSymtab.cpp
123

Can you simply use a different constructor for Used that takes the begin and end iterator to avoid a loop? Here and other places where possible.

MaskRay updated this revision to Diff 325878.Feb 23 2021, 12:37 PM
MaskRay edited the summary of this revision. (Show Details)

Simplify with begin/end constructor

MaskRay marked an inline comment as done.Feb 23 2021, 12:37 PM
tejohnson accepted this revision.Feb 23 2021, 2:35 PM

Add that it depends on D97128 to summary (which will help point to context for anyone looking at this later).
lgtm

This revision is now accepted and ready to land.Feb 23 2021, 2:35 PM
MaskRay retitled this revision from collectUsedGlobalVariables: migrate SmallPtrSetImpl overload to SmallVecImpl overload to collectUsedGlobalVariables: migrate SmallPtrSetImpl overload to SmallVecImpl overload after D97128.Feb 23 2021, 3:54 PM
This revision was landed with ongoing or failed builds.Feb 23 2021, 4:09 PM
This revision was automatically updated to reflect the committed changes.