[llvm] r261543 - [ifcnv] Add comment explaining why it's OK to duplicate convergent MIs in ifcnv.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 09:51:31 PST 2016
Author: jlebar
Date: Mon Feb 22 11:51:30 2016
New Revision: 261543
URL: http://llvm.org/viewvc/llvm-project?rev=261543&view=rev
Log:
[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
Modified:
llvm/trunk/lib/CodeGen/IfConversion.cpp
Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=261543&r1=261542&r2=261543&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
+++ llvm/trunk/lib/CodeGen/IfConversion.cpp Mon Feb 22 11:51:30 2016
@@ -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(BBInf
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;
More information about the llvm-commits
mailing list