GCC功能后缀“isra”是什么?意思? [英] What does the GCC function suffix "isra" mean?
问题描述
在分析使用gcc编译的程序时,我注意到了诸如 foo.isra.3
之类的函数。 isra
表示什么?我注意到其中一个函数只在几个地方被调用,其中一个参数总是被指定为一个文字值。也许它意味着它是为某些参数优化的函数的变体?
ISRA是由IPA SRA创建的变量名称...
IPA SRA是一个优化选项:
-fipa-sra
执行集合的过程间标量替换未使用的参数以及通过由值传递的参数传递的参数替换。
启用级别为-O2,-O3和-Os。
所以最有可能的是,它是具有这些优化的函数的一个版本。
在你提到的情况下,它可能会用传值代替传递引用,因为它知道没有必要通过引用来传递文字。
While profiling a program compiled with gcc, I noticed functions like foo.isra.3
. What does isra
indicate? I notice that one of the functions is only called in a few places, and one of the arguments is always specified as a literal value. Maybe it means it's a variant of the function optimised for certain arguments?
According to a comment on this bug report (and similar comments I could find):
ISRA is the name of the variable that gets created by IPA SRA ...
IPA SRA is an optimization option:
-fipa-sra
Perform interprocedural scalar replacement of aggregates, removal of unused parameters and replacement of parameters passed by reference by parameters passed by value.
Enabled at levels -O2, -O3 and -Os.
So most likely, it's a version of a function with those optimizations.
In the case you mentioned, it's possible that it's replacing a pass-by-reference with a pass-by-value since it knows there's no point to passing a literal by reference.
这篇关于GCC功能后缀“isra”是什么?意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!