search for: howtowriteapass

Displaying 3 results from an estimated 3 matches for "howtowriteapass".

2004 Jun 24
0
[LLVMdev] Pass vs. FunctionPass
...s a simple way to look at it. Use a Function pass whenever you can. A function pass will always work where a Pass works (it derives from pass as you've noticed), but not the other way around. In particular, there are *strict* rules that must be followed by FunctionPass's, described in the HowToWriteAPass document. Like Patrick mentioned, these allow the pass manager to optimize the execution of passes on a module, and eventually will allow us to compile functions in parallel on different threads at the same time. > Another question is about FunctionPassManager::run(Function&) and > Func...
2004 Jun 24
3
[LLVMdev] Pass vs. FunctionPass
I wonder in what cases FunctionPass is better that Pass. For example, addPassesToEmitAssembly takes PassManger and addPassesToJITCompile takes FunctionPassManager. Another question is about FunctionPassManager::run(Function&) and FunctionPass(Function&). The former calls the later, which is fine, but the latter looks like this: bool FunctionPass::run(Function &F) { if
2005 Apr 18
1
[LLVMdev] Best way to require a pass from a dynamically loaded module?
Hi, I have a situation where I built an analysis pass as a loadable module, but I'd like to require it from other passes, to make it available if it's been loaded. Is there a clean way to do this, or am I stretching it too far? If there isn't a nice way, I'd be interested in discussion about what would be the least ugly hack just to get it working. Thanks! -mike -- Michael