Tensor Comprehensions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
codegen_llvm.h
Go to the documentation of this file.
1 
16 #pragma once
17 
18 #include <memory>
19 #include <string>
20 
21 #include "llvm/IR/LLVMContext.h"
22 #include "llvm/IR/Module.h"
23 #include "llvm/Target/TargetMachine.h"
24 
25 #include "Halide/Halide.h"
26 
27 namespace tc {
28 namespace polyhedral {
29 struct Scop;
30 
31 std::unique_ptr<llvm::Module> emitLLVMKernel(
32  const std::string& specializedName,
33  const Scop& scop,
34  const llvm::DataLayout& dataLayout);
35 
36 // TODO: I want to do something like the following, but compilation was unhappy
37 // using initialize_llvm = Halide::Internal::CodeGen_LLVM::initialize_llvm;
38 static inline void initialize_llvm() {
39  Halide::Internal::CodeGen_LLVM::initialize_llvm();
40 }
41 
42 } // namespace polyhedral
43 } // namespace tc