search for: functioniter

Displaying 5 results from an estimated 5 matches for "functioniter".

Did you mean: functionattr
2012 Nov 05
2
[LLVMdev] Adding function attributes
...method is actually being > called? > > Ciao, Duncan. > > >> Any help is much appreciated >> >> >> Code >> ==== >> virtual bool runOnModule(Module& m) >> { >> Module* module = &m; >> >> for (Module::iterator functionIter = module->begin(); functionIter != >> module->end(); functionIter++) >> functionIter->addFnAttr(llvm::**Attributes::AlwaysInline); >> >> return true; >> } >> >> >> Command line >> =========== >> clang -O0 -S -emit-ll...
2012 Nov 05
2
[LLVMdev] Adding function attributes
...e the AlwaysInline attribute is not in the output LLVM IR. Maybe the function iterator passed by the module object actually points to copies of the functions? Any help is much appreciated Code ==== virtual bool runOnModule(Module& m) { Module* module = &m; for (Module::iterator functionIter = module->begin(); functionIter != module->end(); functionIter++) functionIter->addFnAttr(llvm::Attributes::AlwaysInline); return true; } Command line =========== clang -O0 -S -emit-llvm -o test.S test.c && opt -S -mem2reg -load <path to lib> -mypass < test....
2012 Nov 05
0
[LLVMdev] Adding function attributes
...y being called? > > Ciao, Duncan. > > > Any help is much appreciated > > > Code > ==== > virtual bool runOnModule(Module& m) > { > Module* module = &m; > > for (Module::iterator functionIter = module->begin(); functionIter != > module->end(); functionIter++) > functionIter->addFnAttr(llvm::__Attributes::AlwaysInline); > > return true; > } > > > Command line > =========== > cla...
2012 Nov 05
0
[LLVMdev] Adding function attributes
...;t being run at all - did you check that your runOnModule method is actually being called? Ciao, Duncan. > > Any help is much appreciated > > > Code > ==== > virtual bool runOnModule(Module& m) > { > Module* module = &m; > > for (Module::iterator functionIter = module->begin(); functionIter != > module->end(); functionIter++) > functionIter->addFnAttr(llvm::Attributes::AlwaysInline); > > return true; > } > > > Command line > =========== > clang -O0 -S -emit-llvm -o test.S test.c && opt -S -mem...
2012 Nov 06
1
[LLVMdev] Adding function attributes
...{ module = NULL; loopInfo = NULL; scalarEvolution = NULL; } virtual bool runOnModule(Module& m) { module = &m; bool modified = false; for (Module::iterator functionIter = module->begin(); functionIter != module->end(); functionIter++) { if (functionIter->isDeclaration()) continue; Attributes attributes = functionIter->getFnAttributes(); if (!attri...