Skip to content

Commit 700aa5e

Browse files
authored
[revert][CodeGen] add a command to force global merge (#168230)
sorry, this was my mistake
1 parent 3705921 commit 700aa5e

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

llvm/lib/CodeGen/GlobalMerge.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ EnableGlobalMerge("enable-global-merge", cl::Hidden,
111111
cl::desc("Enable the global merge pass"),
112112
cl::init(true));
113113

114-
static cl::opt<bool>
115-
ForceEnableGlobalMerge("force-enable-global-merge", cl::Hidden,
116-
cl::desc("Force enable the global merge, regardless of the optimization level"),
117-
cl::init(false));
118-
119114
static cl::opt<unsigned>
120115
GlobalMergeMaxOffset("global-merge-max-offset", cl::Hidden,
121116
cl::desc("Set maximum offset for global merge pass"),
@@ -379,8 +374,7 @@ bool GlobalMergeImpl::doMerge(SmallVectorImpl<GlobalVariable *> &Globals,
379374
Function *ParentFn = I->getParent()->getParent();
380375

381376
// If we're only optimizing for size, ignore non-minsize functions.
382-
// And add a config to force global merge
383-
if (!ForceEnableGlobalMerge && (Opt.SizeOnly && !ParentFn->hasMinSize()))
377+
if (Opt.SizeOnly && !ParentFn->hasMinSize())
384378
continue;
385379

386380
size_t UGSIdx = GlobalUsesByFunction[ParentFn];

llvm/test/CodeGen/ARM/force-global-merge.ll

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)