1#ifndef HALIDE_LLVM_HEADERS_H
2#define HALIDE_LLVM_HEADERS_H
7#error "Compiling Halide requires LLVM 17.0 or newer"
12#pragma warning(push, 0)
15#pragma GCC system_header
18#pragma clang system_header
23#if WITH_WABT || WITH_V8
24#include <lld/Common/Driver.h>
25#include <lld/Common/ErrorHandler.h>
27#include <llvm/ADT/APFloat.h>
28#include <llvm/ADT/ArrayRef.h>
29#include <llvm/ADT/SmallVector.h>
30#include <llvm/ADT/StringMap.h>
31#include <llvm/ADT/StringRef.h>
32#include <llvm/ADT/Twine.h>
33#include <llvm/Analysis/AliasAnalysis.h>
34#include <llvm/Analysis/TargetLibraryInfo.h>
35#include <llvm/Analysis/TargetTransformInfo.h>
36#include <llvm/Bitcode/BitcodeReader.h>
37#include <llvm/Bitcode/BitcodeWriter.h>
38#include <llvm/ExecutionEngine/Orc/LLJIT.h>
39#include <llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h>
40#include <llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h>
41#include <llvm/ExecutionEngine/SectionMemoryManager.h>
42#include <llvm/IR/Constant.h>
43#include <llvm/IR/Constants.h>
44#include <llvm/IR/DataLayout.h>
45#include <llvm/IR/DerivedTypes.h>
46#include <llvm/IR/Function.h>
47#include <llvm/IR/GlobalValue.h>
48#include <llvm/IR/GlobalVariable.h>
49#include <llvm/IR/IRBuilder.h>
50#include <llvm/IR/InlineAsm.h>
51#include <llvm/IR/Instructions.h>
52#include <llvm/IR/Intrinsics.h>
54#include <llvm/IR/IntrinsicsHexagon.h>
56#include <llvm/IR/LegacyPassManager.h>
57#include <llvm/IR/MDBuilder.h>
58#include <llvm/IR/Metadata.h>
59#include <llvm/IR/Module.h>
60#include <llvm/IR/PassTimingInfo.h>
61#include <llvm/IR/Type.h>
62#include <llvm/IR/Value.h>
63#include <llvm/IR/Verifier.h>
64#include <llvm/Linker/Linker.h>
65#include <llvm/MC/MCTargetOptions.h>
66#include <llvm/MC/TargetRegistry.h>
67#include <llvm/Object/ArchiveWriter.h>
68#include <llvm/Object/ObjectFile.h>
69#include <llvm/Passes/PassBuilder.h>
70#include <llvm/Support/Casting.h>
71#include <llvm/Support/CodeGen.h>
72#include <llvm/Support/CommandLine.h>
73#include <llvm/Support/DataExtractor.h>
74#include <llvm/Support/DynamicLibrary.h>
75#include <llvm/Support/ErrorHandling.h>
76#include <llvm/Support/FileSystem.h>
77#include <llvm/Support/FormattedStream.h>
78#include <llvm/Support/TargetSelect.h>
79#include <llvm/Support/TypeSize.h>
80#include <llvm/Support/raw_os_ostream.h>
81#include <llvm/Support/raw_ostream.h>
82#include <llvm/Target/TargetMachine.h>
83#include <llvm/Target/TargetOptions.h>
84#include <llvm/TargetParser/Triple.h>
85#include <llvm/Transforms/IPO.h>
86#include <llvm/Transforms/IPO/AlwaysInliner.h>
87#include <llvm/Transforms/IPO/Inliner.h>
89#include <llvm/Transforms/Instrumentation.h>
91#include <llvm/Transforms/Instrumentation/AddressSanitizer.h>
92#include <llvm/Transforms/Instrumentation/SanitizerCoverage.h>
93#include <llvm/Transforms/Instrumentation/ThreadSanitizer.h>
94#include <llvm/Transforms/Scalar/GVN.h>
95#include <llvm/Transforms/Utils/ModuleUtils.h>
96#include <llvm/Transforms/Utils/SymbolRewriter.h>
97#if LLVM_VERSION >= 180
98#include <llvm/Transforms/Utils/RelLookupTableConverter.h>
124 return f->getName().str();
128 return f.getName().str();
132 return llvm::StructType::getTypeByName(module->getContext(), name);
llvm::StructType * get_llvm_struct_type_by_name(llvm::Module *module, const char *name)
auto iterator_to_pointer(T iter) -> decltype(&*std::declval< T >())
std::string get_llvm_function_name(const llvm::Function *f)
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.