summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-02-22 17:51:30 +0000
committerJustin Lebar <jlebar@google.com>2016-02-22 17:51:30 +0000
commitf62b165a0403434999cf77e265ce3dafce8dddcc (patch)
treeb349825916e63797288f45dbc37f3ee21c6c01fd /llvm
parent3a7bc57e632782ee46fd629fe654e72117e6210d (diff)
downloadbcm5719-llvm-f62b165a0403434999cf77e265ce3dafce8dddcc.tar.gz
bcm5719-llvm-f62b165a0403434999cf77e265ce3dafce8dddcc.zip
[ifcnv] Add comment explaining why it's OK to duplicate convergent MIs in ifcnv.
Summary: Also add a comment briefly explaining what ifcnv is. No functional changes. Reviewers: resistor Subscribers: echristo, tra, llvm-commits Differential Revision: http://reviews.llvm.org/D17430 llvm-svn: 261543
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/IfConversion.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp
index 41f9f0ba83d..a8e72f4be84 100644
--- a/llvm/lib/CodeGen/IfConversion.cpp
+++ b/llvm/lib/CodeGen/IfConversion.cpp
@@ -7,7 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// This file implements the machine instruction level if-conversion pass.
+// This file implements the machine instruction level if-conversion pass, which
+// tries to convert conditional branches into predicated instructions.
//
//===----------------------------------------------------------------------===//
@@ -673,6 +674,9 @@ void IfConverter::ScanInstructions(BBInfo &BBI) {
if (I->isDebugValue())
continue;
+ // Don't need to check isConvergent(). It's OK to duplicate convergent
+ // instructions here, because we'll only push convergent operations up the
+ // CFG -- this can only *remove* control-flow dependencies.
if (I->isNotDuplicable())
BBI.CannotBeCopied = true;
OpenPOWER on IntegriCloud