aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-07-27 23:34:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-12-01 12:32:12 +0000
commitfbc266465ed3585efdbd8e9ebf71e97ce7e8b464 (patch)
tree7560c2cbec09e542e5f2e2100ffc16ca742b1075 /contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp
parentac8517f04c0fe31968ed43e36608ad02d72d3597 (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp b/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp
index 6b2e69da76f2..ff0fd61078c0 100644
--- a/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp
+++ b/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp
@@ -264,7 +264,7 @@ raw_ostream &operator<<(raw_ostream &OS, const Print<Block> &P) {
MachineBasicBlock *BB = P.Obj.Addr->getCode();
unsigned NP = BB->pred_size();
std::vector<int> Ns;
- auto PrintBBs = [&OS](std::vector<int> Ns) -> void {
+ auto PrintBBs = [&OS](const std::vector<int> &Ns) -> void {
unsigned N = Ns.size();
for (int I : Ns) {
OS << "%bb." << I;
@@ -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) {