[llvm-dev] Question about using multiple functions in a Function pass

Iulia Stirb via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 10 08:56:39 PDT 2019


Hi all,
I would want to know if from the runOnFunction method of a Function pass, other functions in IR, except for the one received as parameter, can be obtained as well, from a call instruction, as follows:
Function F = dyn_cast<Function>(callInst);
Or do I need a Module pass to work in IR with multiple functions from input source code? If so, it is accepted to have O(n^3) complexity in a module pass when iterating through each instruction of each basic block of each function in the module.
Unrelated to the topic, I would also like to ask if a module object contains the IR for the entire application if the application contains multiple source files?

Kind regards,
Iulia ȘTIRB




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190910/251e6a6b/attachment.html>


More information about the llvm-dev mailing list