Stephen Lin
2013-Jul-05 15:14 UTC
[LLVMdev] Docs question: legality of inspecting other functions in a function pass
> both dragonegg and clang (AFAIK) run some function passes on each function > in turn as they are turned into LLVM IR. If such a function pass tried to > inspect other functions then they won't be able to see all function bodies > because they haven't all been output yet. And which functions do have > bodies > available to be inspected depends on the order in which clang decides to > output functions, so the results of running the pass would depend on that > order. > > Ciao, Duncan.OK, so to be clear, the docs are incomplete and need to be updated? Just trying to get explicit confirmation before I patch this... Stephen
Duncan Sands
2013-Jul-06 06:45 UTC
[LLVMdev] Docs question: legality of inspecting other functions in a function pass
Hi Stephen, On 05/07/13 17:14, Stephen Lin wrote:>> both dragonegg and clang (AFAIK) run some function passes on each function >> in turn as they are turned into LLVM IR. If such a function pass tried to >> inspect other functions then they won't be able to see all function bodies >> because they haven't all been output yet. And which functions do have >> bodies >> available to be inspected depends on the order in which clang decides to >> output functions, so the results of running the pass would depend on that >> order. >> >> Ciao, Duncan. > > OK, so to be clear, the docs are incomplete and need to be updated? > Just trying to get explicit confirmation before I patch this...in my opinion function passes should not be inspecting the bodies of other functions. I'm happy to review a doc patch that says this. Ciao, Duncan.
Stephen Lin
2013-Jul-06 09:49 UTC
[LLVMdev] Docs question: legality of inspecting other functions in a function pass
> in my opinion function passes should not be inspecting the bodies of other > functions. I'm happy to review a doc patch that says this. > > Ciao, Duncan. >OK, thanks, I submitted a (one-line) patch to llvm-commits: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130701/180210.html I'll commit it in a few days if no one objects. Stephen
Possibly Parallel Threads
- [LLVMdev] Docs question: legality of inspecting other functions in a function pass
- [LLVMdev] Docs question: legality of inspecting other functions in a function pass
- [LLVMdev] Docs question: legality of inspecting other functions in a function pass
- [LLVMdev] Docs question: legality of inspecting other functions in a function pass
- [LLVMdev] Docs question: legality of inspecting other functions in a function pass