What's the difference between "ModulePassManagers", "FunctionPassManager" and "BasicBlockPassManagers" in LLVM?
And, does "FunctionPassManager" can only be used on "function" type in LLVM-IR?
What's the difference between "ModulePassManagers", "FunctionPassManager" and "BasicBlockPassManagers" in LLVM?
And, does "FunctionPassManager" can only be used on "function" type in LLVM-IR?
LLVM IR is subdivided into different units. The different units of LLVM IR are as follows
A module consists of functions that are in turn made up of different basic blocks that contain a sequence of instructions. The different pass managers operate on different levels on LLVM-IR. E.g the difference between them is on what abstraction level they operate.
Some useful links discussing the matter in more detail.
Passes in LLVM
About the LLVM pass manager