2016-05-05 04:37:32 +02:00
|
|
|
//===- ElimAvailExtern.h - Optimize Global Variables ------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 09:50:56 +01:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2016-05-05 04:37:32 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This transform is designed to eliminate available external global
|
|
|
|
// definitions from the program, turning them into declarations.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_TRANSFORMS_IPO_ELIMAVAILEXTERN_H
|
|
|
|
#define LLVM_TRANSFORMS_IPO_ELIMAVAILEXTERN_H
|
|
|
|
|
|
|
|
#include "llvm/IR/PassManager.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2017-10-11 00:49:55 +02:00
|
|
|
class Module;
|
|
|
|
|
2016-05-05 04:37:32 +02:00
|
|
|
/// A pass that transforms external global definitions into declarations.
|
|
|
|
class EliminateAvailableExternallyPass
|
|
|
|
: public PassInfoMixin<EliminateAvailableExternallyPass> {
|
|
|
|
public:
|
2016-06-17 02:11:01 +02:00
|
|
|
PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
|
2016-05-05 04:37:32 +02:00
|
|
|
};
|
2017-10-11 00:49:55 +02:00
|
|
|
|
|
|
|
} // end namespace llvm
|
2016-05-05 04:37:32 +02:00
|
|
|
|
|
|
|
#endif // LLVM_TRANSFORMS_IPO_ELIMAVAILEXTERN_H
|