diff options
author | Jay Foad <jay.foad@amd.com> | 2024-02-05 14:15:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 14:15:55 +0000 |
commit | abea3b27991dd73cad251f623a2a8f25a3e786ff (patch) | |
tree | 95cfc0972297330fe92d17b52720cc373e3ab166 | |
parent | 5f5b3bb22b2e4ffcd14a8fc8a5edc14bc098a47e (diff) | |
download | llvm-abea3b27991dd73cad251f623a2a8f25a3e786ff.zip llvm-abea3b27991dd73cad251f623a2a8f25a3e786ff.tar.gz llvm-abea3b27991dd73cad251f623a2a8f25a3e786ff.tar.bz2 |
[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.
-rw-r--r-- | llvm/lib/CodeGen/RDFGraph.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RDFGraph.cpp b/llvm/lib/CodeGen/RDFGraph.cpp index 6b2e69d..6276a47 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) { |