[PATCH] D22320: Codegen: Tail Duplication: Only duplicate into layout pred if it is a CFG Pred.
Kyle Butt via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 16:00:38 PDT 2016
iteratee removed rL LLVM as the repository for this revision.
iteratee updated this revision to Diff 63876.
iteratee added a comment.
Add a comment above the check.
http://reviews.llvm.org/D22320
Files:
lib/CodeGen/TailDuplicator.cpp
Index: lib/CodeGen/TailDuplicator.cpp
===================================================================
--- lib/CodeGen/TailDuplicator.cpp
+++ lib/CodeGen/TailDuplicator.cpp
@@ -814,6 +814,8 @@
// This has to check PrevBB->succ_size() because EH edges are ignored by
// AnalyzeBranch.
if (PrevBB->succ_size() == 1 &&
+ // Layout preds are not always CFG preds. Check.
+ *PrevBB->succ_begin() == TailBB &&
!TII->AnalyzeBranch(*PrevBB, PriorTBB, PriorFBB, PriorCond, true) &&
PriorCond.empty() && !PriorTBB && TailBB->pred_size() == 1 &&
!TailBB->hasAddressTaken()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22320.63876.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160713/d10654c5/attachment.bin>
More information about the llvm-commits
mailing list