[PATCH] D87417: [MachineBasicBlock] Fix a typo in function copySuccessor
Guozhi Wei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 14:51:04 PDT 2020
Carrot created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Carrot requested review of this revision.
The condition used decide if need to copy probability should be reversed. Looks like a typo.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87417
Files:
llvm/lib/CodeGen/MachineBasicBlock.cpp
Index: llvm/lib/CodeGen/MachineBasicBlock.cpp
===================================================================
--- llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -844,7 +844,7 @@
void MachineBasicBlock::copySuccessor(MachineBasicBlock *Orig,
succ_iterator I) {
- if (Orig->Probs.empty())
+ if (!Orig->Probs.empty())
addSuccessor(*I, Orig->getSuccProbability(I));
else
addSuccessorWithoutProb(*I);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87417.290829.patch
Type: text/x-patch
Size: 495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200909/482040d7/attachment.bin>
More information about the llvm-commits
mailing list