brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 0dbd467 Raw
51 lines · c
1//===- NewPMDriver.h - Function to drive llc with the new PM ----*- 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-exception6//7//===----------------------------------------------------------------------===//8/// \file9///10/// A single function which is called to drive the llc behavior for the new11/// PassManager.12///13/// This is only in a separate TU with a header to avoid including all of the14/// old pass manager headers and the new pass manager headers into the same15/// file. Eventually all of the routines here will get folded back into16/// llc.cpp.17///18//===----------------------------------------------------------------------===//19#ifndef LLVM_TOOLS_LLC_NEWPMDRIVER_H20#define LLVM_TOOLS_LLC_NEWPMDRIVER_H21 22#include "llvm/IR/DiagnosticHandler.h"23#include "llvm/Support/CodeGen.h"24#include <memory>25 26namespace llvm {27class Module;28class TargetLibraryInfoImpl;29class TargetMachine;30class ToolOutputFile;31class LLVMContext;32class MIRParser;33 34enum class VerifierKind { None, InputOutput, EachPass };35 36struct LLCDiagnosticHandler : public DiagnosticHandler {37  bool handleDiagnostics(const DiagnosticInfo &DI) override;38};39 40int compileModuleWithNewPM(StringRef Arg0, std::unique_ptr<Module> M,41                           std::unique_ptr<MIRParser> MIR,42                           std::unique_ptr<TargetMachine> Target,43                           std::unique_ptr<ToolOutputFile> Out,44                           std::unique_ptr<ToolOutputFile> DwoOut,45                           LLVMContext &Context,46                           const TargetLibraryInfoImpl &TLII, VerifierKind VK,47                           StringRef PassPipeline, CodeGenFileType FileType);48} // namespace llvm49 50#endif51