search for: funcclassname

Displaying 4 results from an estimated 4 matches for "funcclassname".

2010 Apr 19
2
[LLVMdev] The "scope" of passes
...ed. Plus, you can always write a BasicBlockPass *and* a FunctionPass that reuse the same code. For example, you could structure your code this way: classname::analyzeBasicBlock (BasicBlock & BB) { ... } BBClassName::runOnBasicBlock (BasicBlock & BB) { analyzeBasicBlock (BB): } FuncClassName::runOnFunction (Function & F) { for each basic block in F { analyzeBasicBlock (BB) } } The you either use the BasicBlockPass or FunctionPass depending upon what your needs are. -- John T. > > Currently, I think this is a better alternative because: > > 1)...
2010 Apr 20
0
[LLVMdev] The "scope" of passes
...s *and* a FunctionPass that reuse > the same code. For example, you could structure your code this way: > > classname::analyzeBasicBlock (BasicBlock & BB) { > ... > } > > BBClassName::runOnBasicBlock (BasicBlock & BB) { > analyzeBasicBlock (BB): > } > > FuncClassName::runOnFunction (Function & F) { > for each basic block in F { > analyzeBasicBlock (BB) > } > } > or BBClassName::runOnBasicBlock (BasicBlock & BB) { do something } FuncClassName::runOnFunction (Function & F) { BBClassName bbPass; for each basic block in...
2010 Apr 17
0
[LLVMdev] The "scope" of passes
hi John, sorry for reply so late. On Tue, Apr 13, 2010 at 10:38 PM, John Criswell <criswell at uiuc.edu> wrote: > Devang Patel wrote: > >> On Mon, Apr 12, 2010 at 6:41 PM, ether zhhb <etherzhhb at gmail.com> wrote: >> >> >> >>> that's because FunctionPass implement the "addLowerLevelRequiredPass" >>> function, but others
2010 Apr 13
2
[LLVMdev] The "scope" of passes
Devang Patel wrote: > On Mon, Apr 12, 2010 at 6:41 PM, ether zhhb <etherzhhb at gmail.com> wrote: > > >> that's because FunctionPass implement the "addLowerLevelRequiredPass" >> function, but others not. >> >> so, is there any special reason that only "addLowerLevelRequiredPass" is >> allow? >> >> > >