[all-commits] [llvm/llvm-project] 270ee6: [Analysis][NFC] Clean-up in ScalarEvolution when c...
David Sherwood via All-commits
all-commits at lists.llvm.org
Tue Sep 17 02:28:46 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 270ee6549c9368b2ff86ef9794a7fd5e5496ef00
https://github.com/llvm/llvm-project/commit/270ee6549c9368b2ff86ef9794a7fd5e5496ef00
Author: David Sherwood <david.sherwood at arm.com>
Date: 2024-09-17 (Tue, 17 Sep 2024)
Changed paths:
M llvm/lib/Analysis/ScalarEvolution.cpp
Log Message:
-----------
[Analysis][NFC] Clean-up in ScalarEvolution when copying predicates (#108851)
There are a few places in ScalarEvolution.cpp where we copy predicates
from one list to another and they have a similar pattern:
for (const auto *P : ENT.Predicates)
Predicates->push_back(P);
We can avoid the loop by writing them like this:
Predicates->append(ENT.Predicates.begin(), ENT.Predicates.end());
which may end up being more efficient since we only have to try
reserving more space once.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list