[LLVMdev] Docs question: legality of inspecting other functions in a function pass
baldrick at free.fr
Fri Jul 5 23:45:53 PDT 2013
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
>> 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
>> 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.
More information about the llvm-dev