-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[lld] NFC. Rename function to better reflect its implementation #136625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-lld Author: Pranav Kant (pranavk) ChangesFull diff: https://github.com/llvm/llvm-project/pull/136625.diff 1 Files Affected:
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp
index 849f6bdd445f9..fe18acc9bc5d9 100644
--- a/lld/ELF/ICF.cpp
+++ b/lld/ELF/ICF.cpp
@@ -120,7 +120,7 @@ template <class ELFT> class ICF {
void forEachClassRange(size_t begin, size_t end,
llvm::function_ref<void(size_t, size_t)> fn);
- void forEachClass(llvm::function_ref<void(size_t, size_t)> fn);
+ void parallelForEachClass(llvm::function_ref<void(size_t, size_t)> fn);
Ctx &ctx;
SmallVector<InputSection *, 0> sections;
@@ -433,7 +433,7 @@ void ICF<ELFT>::forEachClassRange(size_t begin, size_t end,
// Call Fn on each equivalence class.
template <class ELFT>
-void ICF<ELFT>::forEachClass(llvm::function_ref<void(size_t, size_t)> fn) {
+void ICF<ELFT>::parallelForEachClass(llvm::function_ref<void(size_t, size_t)> fn) {
// If threading is disabled or the number of sections are
// too small to use threading, call Fn sequentially.
if (parallel::strategy.ThreadsRequested == 1 || sections.size() < 1024) {
@@ -541,14 +541,14 @@ template <class ELFT> void ICF<ELFT>::run() {
// static content. Use a base offset for these IDs to ensure no overlap with
// the unique IDs already assigned.
uint32_t eqClassBase = ++uniqueId;
- forEachClass([&](size_t begin, size_t end) {
+ parallelForEachClass([&](size_t begin, size_t end) {
segregate(begin, end, eqClassBase, true);
});
// Split groups by comparing relocations until convergence is obtained.
do {
repeat = false;
- forEachClass([&](size_t begin, size_t end) {
+ parallelForEachClass([&](size_t begin, size_t end) {
segregate(begin, end, eqClassBase, false);
});
} while (repeat);
|
@llvm/pr-subscribers-lld-elf Author: Pranav Kant (pranavk) ChangesFull diff: https://github.com/llvm/llvm-project/pull/136625.diff 1 Files Affected:
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp
index 849f6bdd445f9..fe18acc9bc5d9 100644
--- a/lld/ELF/ICF.cpp
+++ b/lld/ELF/ICF.cpp
@@ -120,7 +120,7 @@ template <class ELFT> class ICF {
void forEachClassRange(size_t begin, size_t end,
llvm::function_ref<void(size_t, size_t)> fn);
- void forEachClass(llvm::function_ref<void(size_t, size_t)> fn);
+ void parallelForEachClass(llvm::function_ref<void(size_t, size_t)> fn);
Ctx &ctx;
SmallVector<InputSection *, 0> sections;
@@ -433,7 +433,7 @@ void ICF<ELFT>::forEachClassRange(size_t begin, size_t end,
// Call Fn on each equivalence class.
template <class ELFT>
-void ICF<ELFT>::forEachClass(llvm::function_ref<void(size_t, size_t)> fn) {
+void ICF<ELFT>::parallelForEachClass(llvm::function_ref<void(size_t, size_t)> fn) {
// If threading is disabled or the number of sections are
// too small to use threading, call Fn sequentially.
if (parallel::strategy.ThreadsRequested == 1 || sections.size() < 1024) {
@@ -541,14 +541,14 @@ template <class ELFT> void ICF<ELFT>::run() {
// static content. Use a base offset for these IDs to ensure no overlap with
// the unique IDs already assigned.
uint32_t eqClassBase = ++uniqueId;
- forEachClass([&](size_t begin, size_t end) {
+ parallelForEachClass([&](size_t begin, size_t end) {
segregate(begin, end, eqClassBase, true);
});
// Split groups by comparing relocations until convergence is obtained.
do {
repeat = false;
- forEachClass([&](size_t begin, size_t end) {
+ parallelForEachClass([&](size_t begin, size_t end) {
segregate(begin, end, eqClassBase, false);
});
} while (repeat);
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/16959 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/17058 Here is the relevant piece of the build log for the reference
|
No description provided.