Page MenuHomePhabricator

[PredicateInfo] Use SmallVector instead of SmallPtrSet.
ClosedPublic

Authored by fhahn on Jul 16 2019, 1:33 PM.

Details

Summary

We do not need the SmallPtrSet to avoid adding duplicates to
OpsToRename, because we already keep a ValueInfo mapping. If we see an
op for the first time, Infos will be empty and we can also add it to
OpsToRename.

We process operands by visiting BBs depth-first and then iterate over
all instructions & users, so the order should be deterministic.
Therefore we can skip one round of sorting, which we purely needed for
guaranteeing a deterministic order when iterating over the SmallPtrSet.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Jul 16 2019, 1:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2019, 1:33 PM
This revision is now accepted and ready to land.Tue, Jul 23, 2:56 PM
This revision was automatically updated to reflect the committed changes.