projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
948ed21
)
[MCA] Fix crash in `EntryStage::cycleEnd` when there are no instructions.
author
Clement Courbet
<courbet@google.com>
Thu, 2 Mar 2023 12:34:43 +0000
(13:34 +0100)
committer
Clement Courbet
<courbet@google.com>
Thu, 2 Mar 2023 12:43:26 +0000
(13:43 +0100)
llvm/lib/MCA/Stages/EntryStage.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/MCA/Stages/EntryStage.cpp
b/llvm/lib/MCA/Stages/EntryStage.cpp
index
6b3fbb8
..
5c82ce7
100644
(file)
--- a/
llvm/lib/MCA/Stages/EntryStage.cpp
+++ b/
llvm/lib/MCA/Stages/EntryStage.cpp
@@
-67,7
+67,8
@@
llvm::Error EntryStage::cycleResume() {
llvm::Error EntryStage::cycleEnd() {
// Find the first instruction which hasn't been retired.
- auto Range = make_range(&Instructions[NumRetired], Instructions.end());
+ auto Range =
+ make_range(Instructions.begin() + NumRetired, Instructions.end());
auto It = find_if(Range, [](const std::unique_ptr<Instruction> &I) {
return !I->isRetired();
});