[llvm] [MachinePipeliner] Fix elements being added while the list is iterated (PR #80805)
Yuta Mukai via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 00:26:40 PST 2024
https://github.com/ytmukai created https://github.com/llvm/llvm-project/pull/80805
There is no need to add the elements of Objs twice, so the addition is removed.
>From 01a468174de871258bbe59d72e04ae7d88840772 Mon Sep 17 00:00:00 2001
From: Yuta Mukai <mukai.yuta at fujitsu.com>
Date: Wed, 24 Jan 2024 21:47:12 +0900
Subject: [PATCH] [MachinePipeliner] Fix elements being added while the list is
iterated
There is no need to add the elements of Objs twice, so the addition is
removed.
---
llvm/lib/CodeGen/MachinePipeliner.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index 697e0da094422..1bda19b2e6e92 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -768,7 +768,6 @@ static void getUnderlyingObjects(const MachineInstr *MI,
Objs.clear();
return;
}
- Objs.push_back(V);
}
}
More information about the llvm-commits
mailing list