search for: ourfpm

Displaying 20 results from an estimated 21 matches for "ourfpm".

2011 Nov 04
2
[LLVMdev] Question on JIT optimizations
...d like, is to set up the passes in exactly the same as clang -O2 or llvm-gcc -O2 do. Is there some way to get that behavior using the api below? How do language implementors do this in the LLVM environment? Thank you for any help. And thank you for this great tool. Brent FunctionPassManager OurFPM(TheModule); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass());...
2011 Nov 04
0
[LLVMdev] Question on JIT optimizations
...s tucked away in an obscure corner of include: include/llvm/Transforms/IPO/PassManagerBuilder.h Ciao, Duncan. > How do language implementors do this in the LLVM environment? > > Thank you for any help. And thank you for this great tool. > > Brent > > FunctionPassManager OurFPM(TheModule); > > // Set up the optimizer pipeline. Start with registering info about how the > // target lays out data structures. > OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); > // Provide basic AliasAnalysis support for GVN. > OurFPM.add(c...
2012 Feb 20
1
[LLVMdev] ARM opcode format
...std::string error; eBuilder.setErrorStr(&error); ExecutionEngine *TheExecutionEngine = eBuilder.create(); if(!TheExecutionEngine) { std::cout<<error.c_str()<<std::endl; return 1; } // compile and return function pointer FunctionPassManager OurFPM(&mod); // Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "pee...
2010 Nov 15
6
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...ed "F->addFnAttr( Attribute::ReadOnly )" after "Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule)". The passes it sets up are: // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); // Do simple "peephole" optimizations and bit-twiddling optzns. OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. OurFPM.add(createReassociatePass()); // Eliminate Common SubExpressions. OurF...
2012 Feb 20
0
[LLVMdev] ARM opcode format
Guillermo, > I'm sorry I forgot to mention I am compiling the bitcode using the JIT. The > actual error, I get when I'm trying to get the function to the pointer. I'm > using a custom front end that translates Android's Dalvik bytecode into LLVM > bitcode based on Android ICS's modified LLVM version. ARM JIT is broken in many ways. So, what you're seeing is
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Hi Rob, > Hmm ... I tried setting that right after Function::Create but I still get the same result (though flagged with "readonly") did you run the gvn pass (preceded by basic-aa)? Ciao, Duncan.
2010 Nov 15
2
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
> You need to set attribute ReadOnly on the sin / cos functions, using > Function::addFnAttr(Attribute) for example. Hmm ... I tried setting that right after Function::Create but I still get the same result (though flagged with "readonly") declare double @sin(double) readonly declare double @cos(double) readonly define double @foo(double %x) readonly { entry: %calltmp = call
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...ed "F->addFnAttr( Attribute::ReadOnly )" after "Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule)". The passes it sets up are: // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); // Do simple "peephole" optimizations and bit-twiddling optzns. OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. OurFPM.add(createReassociatePass()); // Eliminate Common SubExpressions. OurF...
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...bute::ReadOnly )" after "Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule)". > > The passes it sets up are: > > // Set up the optimizer pipeline. Start with registering info about how the > // target lays out data structures. > OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); > // Do simple "peephole" optimizations and bit-twiddling optzns. > OurFPM.add(createInstructionCombiningPass()); > // Reassociate expressions. > OurFPM.add(createReassociatePass()); > // Eliminate...
2008 Apr 10
2
[LLVMdev] Newbie
...n on a different core) and IMO using LLVM for such a system would be a great choice. </pre> </blockquote> We have looked more into LLVM docs. Indeed it looks feasible and promissing.<br> We are wondering about passes. The kaleidoscope tutorial refers to <br> <pre> OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. OurFPM.add(createReassociatePass()); // Eliminate Common SubExpressions. OurFPM.add(createGVNPass()); // Simplify the control flow graph (deleting unreachable blocks, etc). OurFPM.add(createCFGSimplificationP...
2008 Apr 07
0
[LLVMdev] Newbie
On Mon, Apr 7, 2008 at 5:56 AM, Vania Joloboff <vania.joloboff at inria.fr> wrote: > We do dynamic binary translation. We are in a similar situation to qemu > except we are SystemC / TLM compliant for hardware and bus models. Our > current technology is somewhat like qemu, we translate the binary into > "semantic ops", which are pre-compiled at build time, like qemu.
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...NextToken(); // Make the module, which holds all the code. TheModule = new Module("my cool jit", getGlobalContext()); // Create the JIT. TheExecutionEngine = EngineBuilder(TheModule).create(); { ExistingModuleProvider OurModuleProvider(TheModule); FunctionPassManager OurFPM(&OurModuleProvider); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); // Do simple "peephole" optimizations and bit-twiddling optzns....
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...which holds all the code. > TheModule = new Module("my cool jit", getGlobalContext()); > > // Create the JIT. > > TheExecutionEngine = EngineBuilder(TheModule).create(); > > { > ExistingModuleProvider OurModuleProvider(TheModule); > FunctionPassManager OurFPM(&OurModuleProvider); > > // Set up the optimizer pipeline. Start with registering info about how > the > // target lays out data structures. > OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); > // Do simple "peephole" optimizations an...
2008 Sep 30
1
[LLVMdev] Can't add Merge Duplicate Global Constants pass
Hi I have a program similar to kaleidoscope with same optimization passes. It works fine. But when I tried to add Constant Merge Pass with a line: OurFPM.add(createConstantMergePass()); the program died with segmentation fault. Then I tried to add the same line to native kaleidoscope from http://llvm.org/docs/tutorial/LangImpl4.html and I've got the same segmentation fault. The backtrace log from gdb is: #0 0x085609e7 in llvm::ModulePass::ass...
2012 Feb 20
3
[LLVMdev] ARM opcode format
Hi, I'm sorry I forgot to mention I am compiling the bitcode using the JIT. The actual error, I get when I'm trying to get the function to the pointer. I'm using a custom front end that translates Android's Dalvik bytecode into LLVM bitcode based on Android ICS's modified LLVM version. Thanks, On Mon, Feb 20, 2012 at 7:55 PM, James Molloy <James.Molloy at arm.com>
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...TheModule = new Module("my cool jit", getGlobalContext()); >> >>  // Create the JIT. >> >>  TheExecutionEngine = EngineBuilder(TheModule).create(); >> >>  { >>    ExistingModuleProvider OurModuleProvider(TheModule); >>    FunctionPassManager OurFPM(&OurModuleProvider); >> >>    // Set up the optimizer pipeline.  Start with registering info about >> how the >>    // target lays out data structures. >>    OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); >>    // Do simple "peephol...
2012 Oct 17
2
[LLVMdev] a bug in Kaleidoscope code
...i fixed this by modifying the broken line to: #include "llvm/Support/IRBuilder.h" then i compiled again, but got another error: $ clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy toy.cpp:1115:18: error: unknown type name 'DataLayout' OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout())); this is due to the removal of DataLayout structure from 3.1. how can i fix this bug? thanks, Jun
2008 Apr 07
2
[LLVMdev] Newbie
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Thanks to all those who responded to our email.<br> <br> Tilmann Scheller wrote: <blockquote
2008 Dec 02
1
[LLVMdev] Kaleidoscope tutorial failed at Chapter 4...
...ped to the code: " const TargetData *getTargetData() const { return TD; }" Actually, these codes are suspicous: TheExecutionEngine = ExecutionEngine::create(TheModule); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); There is nothing to initialize the TD variable, so the exception is quite understandable. But how to eliminate this problem? Can anyone give me a help? Thank you very much for any guidance. -- Best regards. -------------- next part -...
2009 Mar 30
1
[LLVMdev] Print native code emitted by the JIT
Hi everybody, I'm toying with the Kaleidoscope example from the documentation (with llvm 2.5) and I want to print out on stderr, the native code (X86) emitted with the JIT. I have found the "createMachineFunctionPrinterPass" function. But when I add it to the FunctionPassManager ( OurFPM.add(createMachineFunctionPrinterPass(cerr, "")); ). I get an error at runtime : "MachineFunction.cpp:378: static llvm::MachineFunction& llvm::MachineFunction::get(const llvm::Function*): Assertion `mc && "Call construct() method first to allocate the object"'...