Skip to content

Commit 8dd0065

Browse files
[LLVM][DAGCombiner] Add command line option to disable the combiner.
1 parent 4ba8f4e commit 8dd0065

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ static cl::opt<bool> EnableShrinkLoadReplaceStoreWithStore(
149149
cl::desc("DAG combiner enable load/<replace bytes>/store with "
150150
"a narrower store"));
151151

152+
static cl::opt<bool> DisableCombines("combiner-disabled", cl::Hidden,
153+
cl::init(false),
154+
cl::desc("Disable the DAG combiner"));
155+
152156
namespace {
153157

154158
class DAGCombiner {
@@ -248,7 +252,8 @@ namespace {
248252
STI(D.getSubtarget().getSelectionDAGInfo()), OptLevel(OL),
249253
BatchAA(BatchAA) {
250254
ForCodeSize = DAG.shouldOptForSize();
251-
DisableGenericCombines = STI && STI->disableGenericCombines(OptLevel);
255+
DisableGenericCombines =
256+
DisableCombines || (STI && STI->disableGenericCombines(OptLevel));
252257

253258
MaximumLegalStoreInBits = 0;
254259
// We use the minimum store size here, since that's all we can guarantee

0 commit comments

Comments
 (0)