mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Summary: Also see D33429 for other ThinLTO + New PM related changes. Reviewers: davide, chandlerc, tejohnson Subscribers: mehdi_amini, Prazek, cfe-commits, inglorion, llvm-commits, eraman Differential Revision: https://reviews.llvm.org/D33525 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304378 91177308-0d34-0410-b5e6-96231b3b80d8
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
//===- ThinLTOBitcodeWriter.h - Bitcode writing pass for ThinLTO ----------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This pass prepares a module containing type metadata for ThinLTO by splitting
|
|
// it into regular and thin LTO parts if possible, and writing both parts to
|
|
// a multi-module bitcode file. Modules that do not contain type metadata are
|
|
// written unmodified as a single module.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TRANSFORMS_IPO_THINLTOBITCODEWRITER_H
|
|
#define LLVM_TRANSFORMS_IPO_THINLTOBITCODEWRITER_H
|
|
|
|
#include <llvm/IR/PassManager.h>
|
|
#include <llvm/Support/raw_ostream.h>
|
|
|
|
namespace llvm {
|
|
|
|
class ThinLTOBitcodeWriterPass
|
|
: public PassInfoMixin<ThinLTOBitcodeWriterPass> {
|
|
raw_ostream &OS;
|
|
raw_ostream *ThinLinkOS;
|
|
|
|
public:
|
|
// Writes bitcode to OS. Also write thin link file to ThinLinkOS, if
|
|
// it's not nullptr.
|
|
ThinLTOBitcodeWriterPass(raw_ostream &OS, raw_ostream *ThinLinkOS)
|
|
: OS(OS), ThinLinkOS(ThinLinkOS) {}
|
|
|
|
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
|
|
};
|
|
|
|
} // namespace llvm
|
|
|
|
#endif
|