search for: thefpm

Displaying 11 results from an estimated 11 matches for "thefpm".

Did you mean: theapt
2010 Nov 15
1
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Still no luck after switching to: theFPM->add( new llvm::TargetData( *theExecutionEngine->getTargetData() ) ); theFPM->add( llvm::createBasicAliasAnalysisPass() ); theFPM->add( llvm::createInstructionCombiningPass() ); theFPM->add( llvm::createReassociatePass() ); theFPM->add( llvm::createGVNPass() ); theFPM->add...
2010 Nov 15
6
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
I'm using the gvn pass, not sure about basic-aa. I've copied the code as-is from http://llvm.org/docs/tutorial/LangImpl4.html#code and added "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
2010 Nov 15
0
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
Hi Rob, > I'm using the gvn pass, not sure about basic-aa. if you are using LLVM from svn then you need to specify the basic-aa analysis, otherwise gvn won't unify calls to readonly/readnone functions. This is new behaviour introduced by Dan; probably the tutorial should be updated. Ciao, Duncan. > > I've copied the code as-is from
2013 Sep 19
1
[LLVMdev] How do you add MachineBlockPlacement to a Function Pass Manager?
...g llvm's commit, this pass has been replaced and superseded by Chandler's MachineBlockPlacement pass. What's unclear to me is how exactly do you add this pass to say a function pass manager? The current llvm-lua code has something like this: // ... if(OptLevel > 1) { TheFPM = new llvm::FunctionPassManager(M); // add some passes for opt1 // ... if(OptLevel > 2) { // BlockPlacement TheFPM->add(llvm::createBlockPlacementPass()); // Reassociate expressions. TheFPM->add(llvm::createReassociatePass()); // etc ... I...
2010 Nov 15
1
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...ay, November 15, 2010 4:40 PM > To: 'Duncan Sands' > Cc: 'llvmdev at cs.uiuc.edu'; 'Dan Gohman' > Subject: RE: [LLVMdev] Optimization of calls to functions without side > effects (from Kaleidoscope example) > > Still no luck after switching to: > > theFPM->add( new llvm::TargetData( *theExecutionEngine- > >getTargetData() ) ); > theFPM->add( llvm::createBasicAliasAnalysisPass() ); > theFPM->add( llvm::createInstructionCombiningPass() ); > theFPM->add( llvm::createReassociatePass() ); > theFPM->add( llvm::createGV...
2011 Nov 04
2
[LLVMdev] Question on JIT optimizations
...add(createReassociatePass()); // Eliminate Common SubExpressions. OurFPM.add(createGVNPass()); // Simplify the control flow graph (deleting unreachable blocks, etc). OurFPM.add(createCFGSimplificationPass()); OurFPM.doInitialization(); // Set the global so the code gen can use this. TheFPM = &OurFPM; // Run the main "interpreter loop" now. MainLoop(); -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111104/edc16816/attachment.html>
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...-----------------------------===// // Code Generation //===----------------------------------------------------------------------===// static Module *TheModule; static IRBuilder<> Builder(getGlobalContext()); static std::map<std::string, Value*> NamedValues; static FunctionPassManager *TheFPM; Value *ErrorV(const char *Str) { Error(Str); return 0; } Value *NumberExprAST::Codegen() { return ConstantFP::get(getGlobalContext(), APFloat(Val)); } Value *VariableExprAST::Codegen() { // Look this variable up in the function. Value *V = NamedValues[Name]; return V ? V : ErrorV("...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...// Code Generation > > //===----------------------------------------------------------------------===// > > static Module *TheModule; > static IRBuilder<> Builder(getGlobalContext()); > static std::map<std::string, Value*> NamedValues; > static FunctionPassManager *TheFPM; > > Value *ErrorV(const char *Str) { Error(Str); return 0; } > > Value *NumberExprAST::Codegen() { > return ConstantFP::get(getGlobalContext(), APFloat(Val)); > } > > Value *VariableExprAST::Codegen() { > // Look this variable up in the function. > Value *V = Named...
2011 Nov 04
0
[LLVMdev] Question on JIT optimizations
...Common SubExpressions. > OurFPM.add(createGVNPass()); > // Simplify the control flow graph (deleting unreachable blocks, etc). > OurFPM.add(createCFGSimplificationPass()); > > OurFPM.doInitialization(); > > // Set the global so the code gen can use this. > TheFPM =&OurFPM; > > // Run the main"interpreter loop" now. > MainLoop(); > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/li...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...>> //===----------------------------------------------------------------------===// >> >> static Module *TheModule; >> static IRBuilder<> Builder(getGlobalContext()); >> static std::map<std::string, Value*> NamedValues; >> static FunctionPassManager *TheFPM; >> >> Value *ErrorV(const char *Str) { Error(Str); return 0; } >> >> Value *NumberExprAST::Codegen() { >>  return ConstantFP::get(getGlobalContext(), APFloat(Val)); >> } >> >> Value *VariableExprAST::Codegen() { >>  // Look this variable up in...
2015 Sep 20
3
How to invoke simplifycfg from code
Simplifycfg doesn't get run by default even with -O3, but 'opt -simplifycfg' can do it. I'm looking to add this functionality to an optimizer program that uses the llvm libraries. What's the best way to do this? I don't really mind whether it becomes available as a command line option as in opt, or I need to hardcode it as always on. To make it available as a command line