mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-13 11:22:03 +00:00
ScopInfo: Fold SmallVectors used in alias check generation back into loop [NFC]
Hoisting small vectors out of a loop seems to be a pure performance optimization, which is unlikely to have great impact in practice. As this hoisting just increases code-complexity, we fold the SmallVectors back into the loop. In subsequent commits, we will further simplify and structure this code, but we committed this change separately to provide an explanation to make clear that we purposefully reverted this optimization. llvm-svn: 292122
This commit is contained in:
parent
e39f9127f9
commit
92fd612c84
@ -2976,11 +2976,9 @@ bool Scop::buildAliasGroups(AliasAnalysis &AA) {
|
||||
splitAliasGroupsByDomain(AliasGroups);
|
||||
|
||||
auto &F = getFunction();
|
||||
MapVector<const Value *, SmallSetVector<MemoryAccess *, 8>> ReadOnlyPairs;
|
||||
SmallPtrSet<const Value *, 4> NonReadOnlyBaseValues;
|
||||
for (AliasGroupTy &AG : AliasGroups) {
|
||||
NonReadOnlyBaseValues.clear();
|
||||
ReadOnlyPairs.clear();
|
||||
MapVector<const Value *, SmallSetVector<MemoryAccess *, 8>> ReadOnlyPairs;
|
||||
SmallPtrSet<const Value *, 4> NonReadOnlyBaseValues;
|
||||
|
||||
if (AG.size() < 2) {
|
||||
AG.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user