[llvm] abea3b2 - [RDF] Skip over NoRegister. NFCI. (#80672)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 06:15:59 PST 2024
Author: Jay Foad
Date: 2024-02-05T14:15:55Z
New Revision: abea3b27991dd73cad251f623a2a8f25a3e786ff
URL: https://github.com/llvm/llvm-project/commit/abea3b27991dd73cad251f623a2a8f25a3e786ff
DIFF: https://github.com/llvm/llvm-project/commit/abea3b27991dd73cad251f623a2a8f25a3e786ff.diff
LOG: [RDF] Skip over NoRegister. NFCI. (#80672)
This just avoids useless work of adding NoRegister to BaseSet, for
consistency with other places that iterate over all physical registers.
Added:
Modified:
llvm/lib/CodeGen/RDFGraph.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/RDFGraph.cpp b/llvm/lib/CodeGen/RDFGraph.cpp
index 6b2e69da76f23..6276a4722e3f0 100644
--- a/llvm/lib/CodeGen/RDFGraph.cpp
+++ b/llvm/lib/CodeGen/RDFGraph.cpp
@@ -870,7 +870,7 @@ void DataFlowGraph::build(const Config &config) {
std::set<RegisterId> BaseSet;
if (BuildCfg.Classes.empty()) {
// Insert every register.
- for (unsigned R = 0, E = getPRI().getTRI().getNumRegs(); R != E; ++R)
+ for (unsigned R = 1, E = getPRI().getTRI().getNumRegs(); R != E; ++R)
BaseSet.insert(R);
} else {
for (const TargetRegisterClass *RC : BuildCfg.Classes) {
More information about the llvm-commits
mailing list