本文介绍了GCC功能后缀“isra”是什么?意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在分析使用gcc编译的程序时,我注意到了诸如 foo.isra.3 之类的函数。 isra 表示什么?我注意到其中一个函数只在几个地方被调用,其中一个参数总是被指定为一个文字值。也许它意味着它是为某些参数优化的函数的变体?

根据(和我能找到的类似评论):

IPA SRA是一个:

所以最有可能的是,它是具有这些优化的函数的一个版本。



在你提到的情况下,它可能会用传值代替传递引用,因为它知道没有必要通过引用来传递文字。


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):

IPA SRA is an optimization option:

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”是什么?意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-10 21:45