[PATCH] D144621: [Assignment Tracking][NFC] Avoid doing some work when maps have same keys
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 08:16:33 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG258c806b4125: [Assignment Tracking][NFC] Avoid doing some work when maps have same keys (authored by Orlando).
Changed prior to commit:
https://reviews.llvm.org/D144621?vs=499750&id=499861#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144621/new/
https://reviews.llvm.org/D144621
Files:
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
Index: llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
===================================================================
--- llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -1630,6 +1630,10 @@
unsigned IntersectSize = Join.size();
(void)IntersectSize;
+ // Check if A and B contain the same variables.
+ if (SymmetricDifference.empty() && A.size() == B.size())
+ return Join;
+
// Add the elements in B with variables that are not in A into
// SymmetricDifference.
for (const auto &Pair : B) {
@@ -1721,6 +1725,10 @@
unsigned IntersectSize = Join.size();
(void)IntersectSize;
+ // Check if A and B contain the same variables.
+ if (SymmetricDifference.empty() && A.size() == B.size())
+ return Join;
+
// Add the elements in B with variables that are not in A into
// SymmetricDifference.
for (const auto &Pair : B) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144621.499861.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230223/587a2ce4/attachment.bin>
More information about the llvm-commits
mailing list