Path: blob/main/contrib/llvm-project/llvm/tools/llc/NewPMDriver.h
35231 views
//===- NewPMDriver.h - Function to drive llc with the new PM ----*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7/// \file8///9/// A single function which is called to drive the llc behavior for the new10/// PassManager.11///12/// This is only in a separate TU with a header to avoid including all of the13/// old pass manager headers and the new pass manager headers into the same14/// file. Eventually all of the routines here will get folded back into15/// llc.cpp.16///17//===----------------------------------------------------------------------===//18#ifndef LLVM_TOOLS_LLC_NEWPMDRIVER_H19#define LLVM_TOOLS_LLC_NEWPMDRIVER_H2021#include "llvm/IR/DiagnosticHandler.h"22#include "llvm/Support/CodeGen.h"23#include <memory>24#include <vector>2526namespace llvm {27class Module;28class TargetLibraryInfoImpl;29class TargetMachine;30class ToolOutputFile;31class LLVMContext;32class MIRParser;3334struct LLCDiagnosticHandler : public DiagnosticHandler {35bool handleDiagnostics(const DiagnosticInfo &DI) override;36};3738int compileModuleWithNewPM(StringRef Arg0, std::unique_ptr<Module> M,39std::unique_ptr<MIRParser> MIR,40std::unique_ptr<TargetMachine> Target,41std::unique_ptr<ToolOutputFile> Out,42std::unique_ptr<ToolOutputFile> DwoOut,43LLVMContext &Context,44const TargetLibraryInfoImpl &TLII, bool NoVerify,45StringRef PassPipeline, CodeGenFileType FileType);46} // namespace llvm4748#endif495051