diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-07 05:40:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-07 05:40:58 +0000 |
commit | f86e1df8770faa76bb277d7c3c27a407869c6f0c (patch) | |
tree | 45805e5ee6156a0c1b369689829100536034d762 /lib/CodeGen/IfConversion.cpp | |
parent | 13cea0bcefa892b6b73c39fd4d30d8bb42392e1f (diff) | |
download | external_llvm-f86e1df8770faa76bb277d7c3c27a407869c6f0c.zip external_llvm-f86e1df8770faa76bb277d7c3c27a407869c6f0c.tar.gz external_llvm-f86e1df8770faa76bb277d7c3c27a407869c6f0c.tar.bz2 |
simplify some code using new predicates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r-- | lib/CodeGen/IfConversion.cpp | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp index 19ed70d..a98347b 100644 --- a/lib/CodeGen/IfConversion.cpp +++ b/lib/CodeGen/IfConversion.cpp @@ -26,26 +26,24 @@ #include "llvm/ADT/STLExtras.h" using namespace llvm; -namespace { - // Hidden options for help debugging. - cl::opt<int> IfCvtFnStart("ifcvt-fn-start", cl::init(-1), cl::Hidden); - cl::opt<int> IfCvtFnStop("ifcvt-fn-stop", cl::init(-1), cl::Hidden); - cl::opt<int> IfCvtLimit("ifcvt-limit", cl::init(-1), cl::Hidden); - cl::opt<bool> DisableSimple("disable-ifcvt-simple", - cl::init(false), cl::Hidden); - cl::opt<bool> DisableSimpleF("disable-ifcvt-simple-false", - cl::init(false), cl::Hidden); - cl::opt<bool> DisableTriangle("disable-ifcvt-triangle", - cl::init(false), cl::Hidden); - cl::opt<bool> DisableTriangleR("disable-ifcvt-triangle-rev", - cl::init(false), cl::Hidden); - cl::opt<bool> DisableTriangleF("disable-ifcvt-triangle-false", - cl::init(false), cl::Hidden); - cl::opt<bool> DisableTriangleFR("disable-ifcvt-triangle-false-rev", - cl::init(false), cl::Hidden); - cl::opt<bool> DisableDiamond("disable-ifcvt-diamond", - cl::init(false), cl::Hidden); -} +// Hidden options for help debugging. +static cl::opt<int> IfCvtFnStart("ifcvt-fn-start", cl::init(-1), cl::Hidden); +static cl::opt<int> IfCvtFnStop("ifcvt-fn-stop", cl::init(-1), cl::Hidden); +static cl::opt<int> IfCvtLimit("ifcvt-limit", cl::init(-1), cl::Hidden); +static cl::opt<bool> DisableSimple("disable-ifcvt-simple", + cl::init(false), cl::Hidden); +static cl::opt<bool> DisableSimpleF("disable-ifcvt-simple-false", + cl::init(false), cl::Hidden); +static cl::opt<bool> DisableTriangle("disable-ifcvt-triangle", + cl::init(false), cl::Hidden); +static cl::opt<bool> DisableTriangleR("disable-ifcvt-triangle-rev", + cl::init(false), cl::Hidden); +static cl::opt<bool> DisableTriangleF("disable-ifcvt-triangle-false", + cl::init(false), cl::Hidden); +static cl::opt<bool> DisableTriangleFR("disable-ifcvt-triangle-false-rev", + cl::init(false), cl::Hidden); +static cl::opt<bool> DisableDiamond("disable-ifcvt-diamond", + cl::init(false), cl::Hidden); STATISTIC(NumSimple, "Number of simple if-conversions performed"); STATISTIC(NumSimpleFalse, "Number of simple (F) if-conversions performed"); @@ -555,7 +553,7 @@ void IfConverter::ScanInstructions(BBInfo &BBI) { BBI.CannotBeCopied = true; bool isPredicated = TII->isPredicated(I); - bool isCondBr = BBI.IsBrAnalyzable && TID->isBranch() && !TID->isBarrier(); + bool isCondBr = BBI.IsBrAnalyzable && TID->isConditionalBranch(); if (!isCondBr) { if (!isPredicated) |