aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/RDFGraph.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-07-26 22:04:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-07-26 22:04:10 +0000
commitac9a064cb179f3425b310fa2847f8764ac970a4d (patch)
tree6f945cdaa68c2b4c688dcf9fec4f922d35f4d1a4 /llvm/lib/CodeGen/RDFGraph.cpp
parent4df029cc74e5ec124f14a5682e44999ce4f086df (diff)
downloadsrc-ac9a064cb179f3425b310fa2847f8764ac970a4d.tar.gz
src-ac9a064cb179f3425b310fa2847f8764ac970a4d.zip
Vendor import of llvm-project main llvmorg-19-init-18630-gf2ccf80136a0,vendor/llvm-project/llvmorg-19-init-18630-gf2ccf80136a0vendor/llvm-project/main
the last commit before the upstream release/19.x branch was created.
Diffstat (limited to 'llvm/lib/CodeGen/RDFGraph.cpp')
-rw-r--r--llvm/lib/CodeGen/RDFGraph.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RDFGraph.cpp b/llvm/lib/CodeGen/RDFGraph.cpp
index 6b2e69da76f2..ff0fd61078c0 100644
--- a/llvm/lib/CodeGen/RDFGraph.cpp
+++ b/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) {