-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[CodeGen] Remove experimental deferred spilling from GreedyRegAlloc #137850
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This experimental option was introduced in 2015 via commit 1192294, and the target hook was added in 2020 via commit 99e865b. There does not appear to have ever been a use of this target hook in tree. This code is complicating one of the most complicated and hard to understand parts of our code base, and was an experiment introduced nearly 10 years ago. Let's get rid of it. Note that the idea described in the original patch is not neccessarily a bad one, and we might return to it someday.
You can test this locally with the following command:git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h llvm/include/llvm/CodeGen/TargetRegisterInfo.h llvm/lib/CodeGen/RegAllocGreedy.cpp View the diff from clang-format here.diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index c93848022..24ed5fcfb 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -314,14 +314,8 @@ INITIALIZE_PASS_END(RAGreedyLegacy, "greedy", "Greedy Register Allocator",
false, false)
#ifndef NDEBUG
-const char *const RAGreedy::StageName[] = {
- "RS_New",
- "RS_Assign",
- "RS_Split",
- "RS_Split2",
- "RS_Spill",
- "RS_Done"
-};
+const char *const RAGreedy::StageName[] = {"RS_New", "RS_Assign", "RS_Split",
+ "RS_Split2", "RS_Spill", "RS_Done"};
#endif
// Hysteresis to use when comparing floats.
@@ -2634,8 +2628,8 @@ MCRegister RAGreedy::selectOrSplitImpl(const LiveInterval &VirtReg,
}
// Finally spill VirtReg itself.
- NamedRegionTimer T("spill", "Spiller", TimerGroupName,
- TimerGroupDescription, TimePassesIsEnabled);
+ NamedRegionTimer T("spill", "Spiller", TimerGroupName, TimerGroupDescription,
+ TimePassesIsEnabled);
LiveRangeEdit LRE(&VirtReg, NewVRegs, *MF, *LIS, VRM, this, &DeadRemats);
spiller().spill(LRE, &Order);
ExtraInfo->setStage(NewVRegs.begin(), NewVRegs.end(), RS_Done);
|
Sure we can get rid of it. |
RKSimon
approved these changes
May 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for the cleanup!
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
…lvm#137850) This experimental option was introduced in 2015 via commit 1192294, and the target hook was added in 2020 via commit 99e865b. There does not appear to have ever been a use of this target hook in tree. This code is complicating one of the most complicated and hard to understand parts of our code base, and was an experiment introduced nearly 10 years ago. Let's get rid of it. Note that the idea described in the original patch is not neccessarily a bad one, and we might return to it someday.
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
…lvm#137850) This experimental option was introduced in 2015 via commit 1192294, and the target hook was added in 2020 via commit 99e865b. There does not appear to have ever been a use of this target hook in tree. This code is complicating one of the most complicated and hard to understand parts of our code base, and was an experiment introduced nearly 10 years ago. Let's get rid of it. Note that the idea described in the original patch is not neccessarily a bad one, and we might return to it someday.
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
…lvm#137850) This experimental option was introduced in 2015 via commit 1192294, and the target hook was added in 2020 via commit 99e865b. There does not appear to have ever been a use of this target hook in tree. This code is complicating one of the most complicated and hard to understand parts of our code base, and was an experiment introduced nearly 10 years ago. Let's get rid of it. Note that the idea described in the original patch is not neccessarily a bad one, and we might return to it someday.
GeorgeARM
pushed a commit
to GeorgeARM/llvm-project
that referenced
this pull request
May 7, 2025
…lvm#137850) This experimental option was introduced in 2015 via commit 1192294, and the target hook was added in 2020 via commit 99e865b. There does not appear to have ever been a use of this target hook in tree. This code is complicating one of the most complicated and hard to understand parts of our code base, and was an experiment introduced nearly 10 years ago. Let's get rid of it. Note that the idea described in the original patch is not neccessarily a bad one, and we might return to it someday.
Ankur-0429
pushed a commit
to Ankur-0429/llvm-project
that referenced
this pull request
May 9, 2025
…lvm#137850) This experimental option was introduced in 2015 via commit 1192294, and the target hook was added in 2020 via commit 99e865b. There does not appear to have ever been a use of this target hook in tree. This code is complicating one of the most complicated and hard to understand parts of our code base, and was an experiment introduced nearly 10 years ago. Let's get rid of it. Note that the idea described in the original patch is not neccessarily a bad one, and we might return to it someday.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This experimental option was introduced in 2015 via commit 1192294, and the target hook was added in 2020 via commit 99e865b. There does not appear to have ever been a use of this target hook in tree.
This code is complicating one of the most complicated and hard to understand parts of our code base, and was an experiment introduced nearly 10 years ago. Let's get rid of it.
Note that the idea described in the original patch is not neccessarily a bad one, and we might return to it someday.