[ARM] ParallelDSP: add option to enable/disable the pass
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Tue, 14 Aug 2018 07:43:49 +0000 (07:43 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Tue, 14 Aug 2018 07:43:49 +0000 (07:43 +0000)
Differential Revision: https://reviews.llvm.org/D50511

llvm-svn: 339645

llvm/lib/Target/ARM/ARMParallelDSP.cpp

index 9d5478b..30b02b3 100644 (file)
@@ -42,6 +42,10 @@ using namespace PatternMatch;
 
 STATISTIC(NumSMLAD , "Number of smlad instructions generated");
 
+static cl::opt<bool>
+DisableParallelDSP("disable-arm-parallel-dsp", cl::Hidden, cl::init(false),
+                   cl::desc("Disable the ARM Parallel DSP pass"));
+
 namespace {
   struct OpChain;
   struct BinOpChain;
@@ -149,6 +153,8 @@ namespace {
     }
 
     bool runOnLoop(Loop *TheLoop, LPPassManager &) override {
+      if (DisableParallelDSP)
+        return false;
       L = TheLoop;
       SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
       AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();