What's the difference between “ModulePassManagers”, “FunctionPassManager” and “BasicBlockPassManagers” in LLVM?

前提是你 提交于 2019-12-24 16:07:43

问题


What's the difference between "ModulePassManagers", "FunctionPassManager" and "BasicBlockPassManagers" in LLVM?

And, does "FunctionPassManager" can only be used on "function" type in LLVM-IR?


回答1:


LLVM IR is subdivided into different units. The different units of LLVM IR are as follows

  • Modules
  • Functions
  • Basic blocks
  • Instructions

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



来源:https://stackoverflow.com/questions/50257850/whats-the-difference-between-modulepassmanagers-functionpassmanager-and-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!