From: Justin Lebar Date: Mon, 22 Feb 2016 17:51:30 +0000 (+0000) Subject: [ifcnv] Add comment explaining why it's OK to duplicate convergent MIs in ifcnv. X-Git-Tag: llvmorg-3.9.0-rc1~13549 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f62b165a0403434999cf77e265ce3dafce8dddcc;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp index 41f9f0b..a8e72f4 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;