From: Wei Mi Date: Tue, 30 Jul 2019 23:14:56 +0000 (+0000) Subject: [DAGCombiner] Add an option to control whether or not to enable store merging. X-Git-Tag: llvmorg-11-init~13245 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=888efda2808ce27da564565219956656d816023d;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 8354250..bf62aa8 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -111,6 +111,11 @@ static cl::opt MaySplitLoadIndex("combiner-split-load-index", cl::Hidden, cl::init(true), cl::desc("DAG combiner may split indexing from loads")); +static cl::opt + EnableStoreMerging("combiner-store-merging", cl::Hidden, cl::init(true), + cl::desc("DAG combiner enable merging multiple stores " + "into a wider store")); + static cl::opt 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();