[PATCH] D119954: [CodeGen] Return better Changed status from PostRAHazardRecognizer
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 18 01:47:02 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG074d1e253634: [CodeGen] Return better Changed status from PostRAHazardRecognizer (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119954/new/
https://reviews.llvm.org/D119954
Files:
llvm/lib/CodeGen/PostRAHazardRecognizer.cpp
Index: llvm/lib/CodeGen/PostRAHazardRecognizer.cpp
===================================================================
--- llvm/lib/CodeGen/PostRAHazardRecognizer.cpp
+++ llvm/lib/CodeGen/PostRAHazardRecognizer.cpp
@@ -76,6 +76,7 @@
return false;
// Loop over all of the basic blocks
+ bool Changed = false;
for (auto &MBB : Fn) {
// We do not call HazardRec->reset() here to make sure we are handling noop
// hazards at the start of basic blocks.
@@ -85,6 +86,8 @@
HazardRec->EmitNoops(NumPreNoops);
TII->insertNoops(MBB, MachineBasicBlock::iterator(MI), NumPreNoops);
NumNoops += NumPreNoops;
+ if (NumPreNoops)
+ Changed = true;
HazardRec->EmitInstruction(&MI);
if (HazardRec->atIssueLimit()) {
@@ -92,5 +95,5 @@
}
}
}
- return true;
+ return Changed;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119954.409878.patch
Type: text/x-patch
Size: 848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220218/b791bbcb/attachment.bin>
More information about the llvm-commits
mailing list