llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
10 #include <llvm/Analysis/TargetLibraryInfo.h>
11 #include <llvm/IR/LLVMContext.h>
12 #include <llvm/Support/raw_ostream.h>
14 #include "core/target.h"
29 const std::string &path,
30 llvm::raw_fd_ostream &os,
45 void Emit(llvm::CodeGenFileType type,
const Prog &prog);
53 llvm::CodeGenOpt::Level opt
57 llvm::MCContext &mcCtx,
58 llvm::MCStreamer &mcStreamer,
59 const llvm::TargetLoweringObjectFile &objInfo,
65 llvm::MCContext &mcCtx,
66 llvm::MCStreamer &mcStreamer,
67 const llvm::TargetLoweringObjectFile &objInfo
76 llvm::raw_fd_ostream &
os_;
virtual ~Emitter()
Destroys the emitter.
Definition: emitter.cpp:72
void EmitOBJ(const Prog &prog)
Emits an object file for a program.
Definition: emitter.cpp:84
llvm::LLVMContext context_
LLVM Context.
Definition: emitter.h:82
Definition: annot_printer.h:47
Target & target_
Underlying target.
Definition: emitter.h:72
Emitter(const std::string &path, llvm::raw_fd_ostream &os, Target &target)
Creates an emitter.
Definition: emitter.cpp:59
virtual ISel * CreateISelPass(const Prog &prog, llvm::CodeGenOpt::Level opt)=0
Creates the LLIR-to-SelectionDAG pass.
virtual llvm::ModulePass * CreateRuntimePass(const Prog &prog, llvm::MCContext &mcCtx, llvm::MCStreamer &mcStreamer, const llvm::TargetLoweringObjectFile &objInfo)=0
Creates the runtime generation pass.
const std::string path_
Path to the output file.
Definition: emitter.h:74
virtual AnnotPrinter * CreateAnnotPass(llvm::MCContext &mcCtx, llvm::MCStreamer &mcStreamer, const llvm::TargetLoweringObjectFile &objInfo, ISel &isel)=0
Creates the annotation generation pass.
bool shared_
Flag to indicate if the target is a shared library.
Definition: emitter.h:80
virtual llvm::LLVMTargetMachine & GetTargetMachine()=0
Returns the generic target machine.
const std::string triple_
Target triple.
Definition: emitter.h:78
void EmitASM(const Prog &prog)
Emits assembly for a program.
Definition: emitter.cpp:78
llvm::raw_fd_ostream & os_
Output stream.
Definition: emitter.h:76