Revert "Dead Virtual Function Elimination"
[llvm-core.git] / include / llvm / Transforms / IPO / GlobalOpt.h
blob48a861ff2cf8f488d94525ff4638f0988e2f359f
1 //===- GlobalOpt.h - Optimize Global Variables ------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This pass transforms simple global variables that never have their address
10 // taken. If obviously true, it marks read/write globals as constant, deletes
11 // variables only stored to, etc.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_TRANSFORMS_IPO_GLOBALOPT_H
16 #define LLVM_TRANSFORMS_IPO_GLOBALOPT_H
18 #include "llvm/IR/PassManager.h"
20 namespace llvm {
22 class Module;
24 /// Optimize globals that never have their address taken.
25 class GlobalOptPass : public PassInfoMixin<GlobalOptPass> {
26 public:
27 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
30 } // end namespace llvm
32 #endif // LLVM_TRANSFORMS_IPO_GLOBALOPT_H