forked from OSchip/llvm-project
[ModuleUtils] Remove dead arg from filterDeadComdatFunctions() (NFC)
The module argument is no longer used.
This commit is contained in:
parent
291660e62f
commit
c8189da201
|
@ -92,7 +92,7 @@ void appendToCompilerUsed(Module &M, ArrayRef<GlobalValue *> Values);
|
|||
/// DeadComdatFunctions are those where every member of the comdat is listed
|
||||
/// and thus removing them is safe (provided *all* are removed).
|
||||
void filterDeadComdatFunctions(
|
||||
Module &M, SmallVectorImpl<Function *> &DeadComdatFunctions);
|
||||
SmallVectorImpl<Function *> &DeadComdatFunctions);
|
||||
|
||||
/// Produce a unique identifier for this module by taking the MD5 sum of
|
||||
/// the names of the module's strong external symbols that are not comdat
|
||||
|
|
|
@ -117,7 +117,7 @@ PreservedAnalyses AlwaysInlinerPass::run(Module &M,
|
|||
if (!InlinedFunctions.empty()) {
|
||||
// Now we just have the comdat functions. Filter out the ones whose comdats
|
||||
// are not actually dead.
|
||||
filterDeadComdatFunctions(M, InlinedFunctions);
|
||||
filterDeadComdatFunctions(InlinedFunctions);
|
||||
// The remaining functions are actually dead.
|
||||
for (Function *F : InlinedFunctions) {
|
||||
M.getFunctionList().erase(F);
|
||||
|
|
|
@ -660,7 +660,7 @@ bool LegacyInlinerBase::removeDeadFunctions(CallGraph &CG,
|
|||
}
|
||||
if (!DeadFunctionsInComdats.empty()) {
|
||||
// Filter out the functions whose comdats remain alive.
|
||||
filterDeadComdatFunctions(CG.getModule(), DeadFunctionsInComdats);
|
||||
filterDeadComdatFunctions(DeadFunctionsInComdats);
|
||||
// Remove the rest.
|
||||
for (Function *F : DeadFunctionsInComdats)
|
||||
RemoveCGN(CG[F]);
|
||||
|
|
|
@ -20,8 +20,7 @@ using namespace llvm;
|
|||
|
||||
bool CallGraphUpdater::finalize() {
|
||||
if (!DeadFunctionsInComdats.empty()) {
|
||||
filterDeadComdatFunctions(*DeadFunctionsInComdats.front()->getParent(),
|
||||
DeadFunctionsInComdats);
|
||||
filterDeadComdatFunctions(DeadFunctionsInComdats);
|
||||
DeadFunctions.append(DeadFunctionsInComdats.begin(),
|
||||
DeadFunctionsInComdats.end());
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ llvm::getOrCreateSanitizerCtorAndInitFunctions(
|
|||
}
|
||||
|
||||
void llvm::filterDeadComdatFunctions(
|
||||
Module &M, SmallVectorImpl<Function *> &DeadComdatFunctions) {
|
||||
SmallVectorImpl<Function *> &DeadComdatFunctions) {
|
||||
SmallPtrSet<Function *, 32> MaybeDeadFunctions;
|
||||
SmallPtrSet<Comdat *, 32> MaybeDeadComdats;
|
||||
for (Function *F : DeadComdatFunctions) {
|
||||
|
|
Loading…
Reference in New Issue