aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorVincent Lejeune <vljn@ovi.com>2013-12-07 01:49:19 +0000
committerVincent Lejeune <vljn@ovi.com>2013-12-07 01:49:19 +0000
commit92b0a64906757ded834bc6e9f8915d889402f3c2 (patch)
treec9a69c1fb74d053799bf2bfa187cdc9541c7ccaa /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentae7e96062cd49436cee8fa8459c0e9e316fb9fd1 (diff)
downloadllvm-92b0a64906757ded834bc6e9f8915d889402f3c2.zip
llvm-92b0a64906757ded834bc6e9f8915d889402f3c2.tar.gz
llvm-92b0a64906757ded834bc6e9f8915d889402f3c2.tar.bz2
Add a RequireStructuredCFG Field to TargetMachine.
llvm-svn: 196634
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index ca71e3b..3d36dc1 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -677,6 +677,11 @@ MachineBasicBlock::SplitCriticalEdge(MachineBasicBlock *Succ, Pass *P) {
MachineFunction *MF = getParent();
DebugLoc dl; // FIXME: this is nowhere
+ // Performance might be harmed on HW that implements branching using exec mask
+ // where both sides of the branches are always executed.
+ if (MF->getTarget().requiresStructuredCFG())
+ return NULL;
+
// We may need to update this's terminator, but we can't do that if
// AnalyzeBranch fails. If this uses a jump table, we won't touch it.
const TargetInstrInfo *TII = MF->getTarget().getInstrInfo();