What's the difference between “ModulePassManag

2019-08-01 05:32发布

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条回答
聊天终结者
2楼-- · 2019-08-01 06:20

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

查看更多
登录 后发表回答