-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[CodeGen][NPM] VirtRegRewriter: Set VirtReg flag #138660
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
[CodeGen][NPM] VirtRegRewriter: Set VirtReg flag #138660
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@llvm/pr-subscribers-llvm-regalloc Author: Akshat Oke (optimisan) ChangesFull diff: https://github.com/llvm/llvm-project/pull/138660.diff 2 Files Affected:
diff --git a/llvm/include/llvm/CodeGen/VirtRegMap.h b/llvm/include/llvm/CodeGen/VirtRegMap.h
index f5fba0d65401e..37d382650ac1f 100644
--- a/llvm/include/llvm/CodeGen/VirtRegMap.h
+++ b/llvm/include/llvm/CodeGen/VirtRegMap.h
@@ -248,6 +248,14 @@ class VirtRegRewriterPass : public PassInfoMixin<VirtRegRewriterPass> {
static bool isRequired() { return true; }
void printPipeline(raw_ostream &OS, function_ref<StringRef(StringRef)>) const;
+
+ MachineFunctionProperties getSetProperties() const {
+ if (ClearVirtRegs) {
+ return MachineFunctionProperties().set(
+ MachineFunctionProperties::Property::NoVRegs);
+ }
+ return {};
+ }
};
} // end llvm namespace
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index 49e819e2d10f7..839905d5e3860 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -302,6 +302,8 @@ bool VirtRegRewriterLegacy::runOnMachineFunction(MachineFunction &MF) {
PreservedAnalyses
VirtRegRewriterPass::run(MachineFunction &MF,
MachineFunctionAnalysisManager &MFAM) {
+ MFPropsModifier _(*this, MF);
+
VirtRegMap &VRM = MFAM.getResult<VirtRegMapAnalysis>(MF);
LiveIntervals &LIS = MFAM.getResult<LiveIntervalsAnalysis>(MF);
LiveRegMatrix &LRM = MFAM.getResult<LiveRegMatrixAnalysis>(MF);
|
d32c6c4
to
87c1295
Compare
72ba54e
to
15c1c3d
Compare
87c1295
to
838e904
Compare
15c1c3d
to
41492e4
Compare
41492e4
to
aac1ecb
Compare
838e904
to
6ecdd40
Compare
aac1ecb
to
f39a691
Compare
6ecdd40
to
6d6546d
Compare
updated with #148107 |
same as #138660, Co-authored-by : Oke, Akshat <[[email protected]](mailto:[email protected])>
same as llvm/llvm-project#138660, Co-authored-by : Oke, Akshat <[[email protected]](mailto:[email protected])>
No description provided.