[PATCH] D64816: [PredicateInfo] Use SmallVector instead of SmallPtrSet.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 13:35:09 PDT 2019
fhahn created this revision.
fhahn added reviewers: efriedma, davide.
Herald added subscribers: mgrang, hiraditya.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D64816
Files:
llvm/include/llvm/Transforms/Utils/PredicateInfo.h
llvm/lib/Transforms/Utils/PredicateInfo.cpp
llvm/test/Transforms/Util/PredicateInfo/condprop.ll
llvm/test/Transforms/Util/PredicateInfo/testandor.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64816.210163.patch
Type: text/x-patch
Size: 10792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/c38c3377/attachment.bin>
More information about the llvm-commits
mailing list