Next: , Previous: Gimplification pass, Up: Passes


9.3 过程管理器

过程管理器在passes.ctree-optimize.ctree-pass.h中。它的工作是按照正确的顺序来运行所有单独的过程,并且处理应用到每个过程的标准薄记(standard bookkeeping)。

工作原理是每个过程定义了一个结构体,用来表示我们需要知道的关于该过程的每件事情——应该什么运行,应该如何运行,需要什么中间语言或者附加的数据结构。我们按照某种特定的运行顺序来注册过程,过程管理器来安排所有的事情都按正确的顺序发生。

目前实际的实现并不是完全做到了理论上所描述的。命令行开关和timevar_id_t枚举还必须定义在其它地方。过程管理器。。。不管怎样,现在的实现是有用的,比没有强。

Each pass should have a unique name. Each pass may have its own dump file (for GCC debugging purposes). Passes with a name starting with a star do not dump anything. Sometimes passes are supposed to share a dump file / option name. To still give these unique names, you can use a prefix that is delimited by a space from the part that is used for the dump file / option name. E.g. When the pass name is "ud dce", the name used for dump file/options is "dce".

TODO:描述由过程管理器建立的全局变量,以及对一个新的过程应该如何使用。