search for: mainfunct

Displaying 9 results from an estimated 9 matches for "mainfunct".

Did you mean: mainfunc
2008 Jan 16
0
[LLVMdev] Cross-module function calls (code included)
...er.h> #include <llvm/ExecutionEngine/ExecutionEngine.h> #include <llvm/Analysis/Verifier.h> #include <llvm/Assembly/PrintModulePass.h> #include <llvm/Support/LLVMBuilder.h> using namespace llvm; void SetupModules(); Module* mainModule; Module* utilityModule; Function *mainFunction; Function *utilityFunctionPrototype; Function *utilityFunction; int main(int argc, char**argv) { ExecutionEngine *executionEngine; SetupModules(); verifyModule(*mainModule, PrintMessageAction); verifyModule(*utilityModule, PrintMessageAction); PassManager PM; PM.add(new PrintModulePass(...
2007 Nov 08
3
[LLVMdev] Newbie JITter
...); for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) if (!I->isDeclaration()) Passes.run(*I); Passes.doFinalization(); ExistingModuleProvider* MP = new ExistingModuleProvider(M); ExecutionEngine* EE = ExecutionEngine::create(MP, false); Function *MainFunction = M->getFunction("main"); if (!MainFunction) { std::cerr << "'main' function not found in module.\n"; return -1; } std::cout << "\n\nRunning main: " << std::flush; // Call the function with no arguments: std::vector...
2013 Jan 08
2
[LLVMdev] ExecutionEngine always comes back NULL
...d code that I use to run code: /* Executes the AST by running the main function */ GenericValue CodeGenContext::runCode() { std::cout << "Running code...\n"; ExecutionEngine *ee = EngineBuilder(module).create(); vector<GenericValue> noargs; GenericValue v = ee->runFunction(mainFunction, noargs); std::cout << "Code was run.\n"; return v; } Il 08/01/2013 16:38, Manuele Conti ha scritto: > Hi Rick, > I had the same problem last week I understand that I didn't > initialized target. > > Cheers, > Manuele > > Il 08/01/2013 16:08, Rick M...
2007 Nov 09
0
[LLVMdev] Newbie JITter
...(), E = M->end(); I != E; ++I) > if (!I->isDeclaration()) > Passes.run(*I); > > Passes.doFinalization(); > > ExistingModuleProvider* MP = new ExistingModuleProvider(M); > ExecutionEngine* EE = ExecutionEngine::create(MP, false); > > Function *MainFunction = M->getFunction("main"); > if (!MainFunction) { > std::cerr << "'main' function not found in module.\n"; > return -1; > } > > std::cout << "\n\nRunning main: " << std::flush; > > // Call the f...
2013 Jan 08
0
[LLVMdev] ExecutionEngine always comes back NULL
...ng code...\n"; > ExecutionEngine *ee = EngineBuilder(module).create(); > < > div class="line" id="LC37" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"> > vector<GenericValue> noargs; > GenericValue v = ee ->runFunction(mainFunction, noargs); > std::cout << ; "Code was run.\n"; > return v; > } Isn't that more-or-less exactly what I have? I don't see anything about the target there. -- Rick
2011 Sep 06
1
several functions in one *.R file in a R package
...ngs to which main function I saved all the respective sub-functions to the same *.R file as their main-function and gave them names beginning with . to somehow hide the sub-functions. The result would be one *.R file in <package>/R for each 'main-function' containing something like: mainfunction <- function() { .subfunction1() .subfunction2() #... } .subfunction1() <- function() { #do some stuff } .subfunction2() <- function() { #do some more stuff } According to the way I understood the "Writing R Extensions" Manual I expected this to work. When I load the...
2013 Jan 09
1
[LLVMdev] ExecutionEngine always comes back NULL
...>> ExecutionEngine *ee = EngineBuilder(module).create(); >> < >> div class="line" id="LC37" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"> >> vector<GenericValue> noargs; >> GenericValue v = ee ->runFunction(mainFunction, noargs); >> std::cout << ; "Code was run.\n"; >> return v; >> } > Isn't that more-or-less exactly what I have? I don't see anything about the target there. >
2013 Jan 08
0
[LLVMdev] ExecutionEngine always comes back NULL
Hi Rick, I had the same problem last week I understand that I didn't initialized target. Cheers, Manuele Il 08/01/2013 16:08, Rick Mann ha scritto: > I wrote a little OS X app to assemble some LLVM (human-readable) code and run it. Unfortunately, my ExecutionEngine won't create. Just comes back NULL. > > This is the code that builds it: > > http://pastebin.com/8cexgPj7
2013 Jan 08
4
[LLVMdev] ExecutionEngine always comes back NULL
I wrote a little OS X app to assemble some LLVM (human-readable) code and run it. Unfortunately, my ExecutionEngine won't create. Just comes back NULL. This is the code that builds it: http://pastebin.com/8cexgPj7 This is the code it seems to successfully assemble, but it can't build the ExecutionEngine. You can see I tried several different ways of building it.