mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
cleanups, switch GlobalDCE to SmallPtrSet instead of std::set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85730 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1876,9 +1876,8 @@ bool GlobalOpt::OptimizeFunctions(Module &M) {
|
||||
if (!F->hasName() && !F->isDeclaration())
|
||||
F->setLinkage(GlobalValue::InternalLinkage);
|
||||
F->removeDeadConstantUsers();
|
||||
if (F->use_empty() && (F->hasLocalLinkage() ||
|
||||
F->hasLinkOnceLinkage())) {
|
||||
M.getFunctionList().erase(F);
|
||||
if (F->use_empty() && (F->hasLocalLinkage() || F->hasLinkOnceLinkage())) {
|
||||
F->eraseFromParent();
|
||||
Changed = true;
|
||||
++NumFnDeleted;
|
||||
} else if (F->hasLocalLinkage()) {
|
||||
|
Reference in New Issue
Block a user