Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
LLVM_Output.h
Go to the documentation of this file.
1#ifndef HALIDE_LLVM_OUTPUTS_H
2#define HALIDE_LLVM_OUTPUTS_H
3
4/** \file
5 *
6 */
7
8#include <memory>
9#include <string>
10#include <vector>
11
12namespace llvm {
13class Module;
14class TargetOptions;
15class LLVMContext;
16class raw_fd_ostream;
17class raw_pwrite_stream;
18class raw_ostream;
19} // namespace llvm
20
21namespace Halide {
22
23class Module;
24struct Target;
25
26namespace Internal {
27typedef llvm::raw_pwrite_stream LLVMOStream;
28}
29
30/** Generate an LLVM module. */
31std::unique_ptr<llvm::Module> compile_module_to_llvm_module(const Module &module, llvm::LLVMContext &context);
32
33/** Construct an llvm output stream for writing to files. */
34std::unique_ptr<llvm::raw_fd_ostream> make_raw_fd_ostream(const std::string &filename);
35
36/** Compile an LLVM module to native targets (objects, native assembly). */
37// @{
40// @}
41
42/** Compile an LLVM module to LLVM targets (bitcode, LLVM assembly). */
43// @{
46// @}
47
48/**
49 * Concatenate the list of src_files into dst_file, using the appropriate
50 * static library format for the given target (e.g., .a or .lib).
51 * If deterministic is true, emit 0 for all GID/UID/timestamps, and 0644 for
52 * all modes (equivalent to the ar -D option).
53 */
54void create_static_library(const std::vector<std::string> &src_files, const Target &target,
55 const std::string &dst_file, bool deterministic = true);
56} // namespace Halide
57
58#endif
A halide module.
Definition Module.h:142
llvm::raw_pwrite_stream LLVMOStream
Definition LLVM_Output.h:27
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
void create_static_library(const std::vector< std::string > &src_files, const Target &target, const std::string &dst_file, bool deterministic=true)
Concatenate the list of src_files into dst_file, using the appropriate static library format for the ...
@ Internal
Not visible externally, similar to 'static' linkage in C.
void compile_llvm_module_to_llvm_assembly(llvm::Module &module, Internal::LLVMOStream &out)
std::unique_ptr< llvm::Module > compile_module_to_llvm_module(const Module &module, llvm::LLVMContext &context)
Generate an LLVM module.
std::unique_ptr< llvm::raw_fd_ostream > make_raw_fd_ostream(const std::string &filename)
Construct an llvm output stream for writing to files.
void compile_llvm_module_to_assembly(llvm::Module &module, Internal::LLVMOStream &out)
void compile_llvm_module_to_object(llvm::Module &module, Internal::LLVMOStream &out)
Compile an LLVM module to native targets (objects, native assembly).
void compile_llvm_module_to_llvm_bitcode(llvm::Module &module, Internal::LLVMOStream &out)
Compile an LLVM module to LLVM targets (bitcode, LLVM assembly).
A struct representing a target machine and os to generate code for.
Definition Target.h:19