-
Notifications
You must be signed in to change notification settings - Fork 0
/
linker.h
35 lines (28 loc) · 1.03 KB
/
linker.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef POCL_LINKER_H
#define POCL_LINKER_H
#include "llvm/IR/Module.h"
#include "llvm/ADT/StringRef.h"
#ifdef __GNUC__
#pragma GCC visibility push(hidden)
#endif
/**
* Link in module lib to krn.
* This function searches for each undefined symbol
* in krn from lib, cloning as needed. For big modules,
* this is faster than calling llvm::Linker and then
* running DCE.
*
* log is used to report errors if we run into undefined symbols
*/
int link(llvm::Module *krn, const llvm::Module *lib, std::string &log, const char **DevAuxFuncs);
int copyKernelFromBitcode(const char *name, llvm::Module *parallel_bc,
const llvm::Module *program,
const char **DevAuxFuncs);
bool moveProgramScopeVarsOutOfProgramBc(llvm::LLVMContext *Context,
llvm::Module *ProgramBC,
llvm::Module *OutputBC,
unsigned DeviceLocalAS);
#ifdef __GNUC__
#pragma GCC visibility pop
#endif
#endif