OSDN Git Service

[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339645 91177308-0d34-0410-b5e6-96231b3b80d8

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();