diff options
author | Wei Mi <wmi@google.com> | 2019-07-30 23:14:56 +0000 |
---|---|---|
committer | Wei Mi <wmi@google.com> | 2019-07-30 23:14:56 +0000 |
commit | 888efda2808ce27da564565219956656d816023d (patch) | |
tree | 59f3bcfa7f90eebf157274597263a57609093931 | |
parent | 6c3c9483e716ea243f407031fcd5615335e63276 (diff) | |
download | bcm5719-llvm-888efda2808ce27da564565219956656d816023d.tar.gz bcm5719-llvm-888efda2808ce27da564565219956656d816023d.zip |
[DAGCombiner] Add an option to control whether or not to enable store merging.
Add an option to control whether or not to enable store merging in dag combiner
so we can workaround some bugs more easily.
Differential Revision: https://reviews.llvm.org/D65482
llvm-svn: 367365
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 835425021dc..bf62aa86509 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -111,6 +111,11 @@ static cl::opt<bool> MaySplitLoadIndex("combiner-split-load-index", cl::Hidden, cl::init(true), cl::desc("DAG combiner may split indexing from loads")); +static cl::opt<bool> + EnableStoreMerging("combiner-store-merging", cl::Hidden, cl::init(true), + cl::desc("DAG combiner enable merging multiple stores " + "into a wider store")); + static cl::opt<unsigned> TokenFactorInlineLimit( "combiner-tokenfactor-inline-limit", cl::Hidden, cl::init(2048), cl::desc("Limit the number of operands to inline for Token Factors")); @@ -15521,7 +15526,7 @@ bool DAGCombiner::checkMergeStoreCandidatesForDependencies( } bool DAGCombiner::MergeConsecutiveStores(StoreSDNode *St) { - if (OptLevel == CodeGenOpt::None) + if (OptLevel == CodeGenOpt::None || !EnableStoreMerging) return false; EVT MemVT = St->getMemoryVT(); |