[llvm] [CodeGen] Use setNoVRegs. NFC. (PR #148831)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 04:58:03 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-regalloc
Author: Jay Foad (jayfoad)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/148831.diff
3 Files Affected:
- (modified) llvm/include/llvm/CodeGen/PostRAMachineSink.h (+1-2)
- (modified) llvm/include/llvm/CodeGen/VirtRegMap.h (+2-4)
- (modified) llvm/lib/CodeGen/MachineSink.cpp (+1-2)
``````````diff
diff --git a/llvm/include/llvm/CodeGen/PostRAMachineSink.h b/llvm/include/llvm/CodeGen/PostRAMachineSink.h
index 2f1f79a0480df..4ab088f17cafc 100644
--- a/llvm/include/llvm/CodeGen/PostRAMachineSink.h
+++ b/llvm/include/llvm/CodeGen/PostRAMachineSink.h
@@ -20,8 +20,7 @@ class PostRAMachineSinkingPass
MachineFunctionAnalysisManager &MFAM);
MachineFunctionProperties getRequiredProperties() const {
- return MachineFunctionProperties().set(
- MachineFunctionProperties::Property::NoVRegs);
+ return MachineFunctionProperties().setNoVRegs();
}
};
diff --git a/llvm/include/llvm/CodeGen/VirtRegMap.h b/llvm/include/llvm/CodeGen/VirtRegMap.h
index b5f962e0fb821..405ae3905ebe5 100644
--- a/llvm/include/llvm/CodeGen/VirtRegMap.h
+++ b/llvm/include/llvm/CodeGen/VirtRegMap.h
@@ -253,10 +253,8 @@ class VirtRegRewriterPass : public PassInfoMixin<VirtRegRewriterPass> {
function_ref<StringRef(StringRef)>) const;
MachineFunctionProperties getSetProperties() const {
- if (ClearVirtRegs) {
- return MachineFunctionProperties().set(
- MachineFunctionProperties::Property::NoVRegs);
- }
+ if (ClearVirtRegs)
+ return MachineFunctionProperties().setNoVRegs();
return {};
}
};
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp
index a0e067a6323b7..9ec5151a039b7 100644
--- a/llvm/lib/CodeGen/MachineSink.cpp
+++ b/llvm/lib/CodeGen/MachineSink.cpp
@@ -2102,8 +2102,7 @@ class PostRAMachineSinkingLegacy : public MachineFunctionPass {
}
MachineFunctionProperties getRequiredProperties() const override {
- return MachineFunctionProperties().set(
- MachineFunctionProperties::Property::NoVRegs);
+ return MachineFunctionProperties().setNoVRegs();
}
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/148831
More information about the llvm-commits
mailing list