summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Lejeune <vljn@ovi.com>2013-07-28 17:08:27 +0200
committerVincent Lejeune <vljn@ovi.com>2013-07-28 17:08:27 +0200
commit48884564aeaab904e0dcc799d4d012652b4a63bf (patch)
treef2783060c30178887276f4a1d334f50fe1bc0640
parent833e62ad3149f7f64e0663f0bea35fed99f7967c (diff)
Not so stupid attempt to fix splitedgecfg
-rw-r--r--lib/CodeGen/PHIElimination.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index bf23ecac4d..7d60095160 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/lib/CodeGen/PHIElimination.cpp
@@ -567,6 +567,10 @@ bool PHIElimination::SplitPHIEdges(MachineFunction &MF,
const MachineLoop *PreLoop = MLI ? MLI->getLoopFor(PreMBB) : 0;
if (IsLoopHeader && PreLoop == CurLoop && !SplitAllCriticalEdges)
continue;
+ // Splitting exit block of a block will introduce multiple exit block :
+ // Ask the target if it is able to handle such situation
+ if (PreLoop && PreLoop != CurLoop && e > 3)
+ continue;
// LV doesn't consider a phi use live-out, so isLiveOut only returns true
// when the source register is live-out for some other reason than a phi