diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:03:47 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:04:23 +0000 |
commit | 7fa27ce4a07f19b07799a767fc29416f3b625afb (patch) | |
tree | 27825c83636c4de341eb09a74f49f5d38a15d165 /llvm/lib/Transforms/IPO/ConstantMerge.cpp | |
parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) |
Diffstat (limited to 'llvm/lib/Transforms/IPO/ConstantMerge.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ConstantMerge.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp index 77bc377f4514..29052c8d997e 100644 --- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp +++ b/llvm/lib/Transforms/IPO/ConstantMerge.cpp @@ -28,8 +28,6 @@ #include "llvm/IR/GlobalVariable.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" -#include "llvm/InitializePasses.h" -#include "llvm/Pass.h" #include "llvm/Support/Casting.h" #include "llvm/Transforms/IPO.h" #include <algorithm> @@ -251,32 +249,3 @@ PreservedAnalyses ConstantMergePass::run(Module &M, ModuleAnalysisManager &) { return PreservedAnalyses::all(); return PreservedAnalyses::none(); } - -namespace { - -struct ConstantMergeLegacyPass : public ModulePass { - static char ID; // Pass identification, replacement for typeid - - ConstantMergeLegacyPass() : ModulePass(ID) { - initializeConstantMergeLegacyPassPass(*PassRegistry::getPassRegistry()); - } - - // For this pass, process all of the globals in the module, eliminating - // duplicate constants. - bool runOnModule(Module &M) override { - if (skipModule(M)) - return false; - return mergeConstants(M); - } -}; - -} // end anonymous namespace - -char ConstantMergeLegacyPass::ID = 0; - -INITIALIZE_PASS(ConstantMergeLegacyPass, "constmerge", - "Merge Duplicate Global Constants", false, false) - -ModulePass *llvm::createConstantMergePass() { - return new ConstantMergeLegacyPass(); -} |