How do I inline a procedure while using Polyspace Client for C/C++ 8.3 (R2012a)?

1 次查看(过去 30 天)
While reviewing the Polyspace log for an analysis I obtain a lot of messages like the following in the "C to intermediate language translation" phase:
inlining procedure_name could decrease the number of aliases of parameter #2 from 9962 to 2091
I would like to know what this means and how I may inline the procedure called ‘procedure_name’. I feel it could help to reduce the analysis run time checks because of the complexity of my code.

采纳的回答

MathWorks Support Team
Polyspace produced this message in the log during pointer analysis to indicate that it may help to reduce complexity around the pointer analysis by inlining the function ‘procedure_name’.
Note that it is only a suggestion and it may or not be helpful depending on the analysis task being run. It is only encouraged to follow this suggestion if there is a reason such as:
i) The verification is taking too long compared to what is usually seen when verifying other code or,
ii) The verification results in a "out of memory" failure at level 1 and it is known that the code contains a lot of pointers.
Note that following the suggestion and relaunching the verification after inlining function may not help and may actually increase the duration of analysis in certain cases. For example, if the function contains 50 lines of code and it is called 50 times in the code, Polyspace would duplicate the function 50 times and add 2500 lines to previous analysis. If the analysis reached the end of level 4 with -02 precision, then inlining is not suggested.
The log message is an indicator that Polyspace encountered complexity, it is difficult to measure whether or not inlining the function would be beneficial.
Based on the above notes, if it is felt that inlining might be helpful, this may be done by adding the name of the function in the text box next to –inline in ‘Verification Settings > Precision/Scaling > Scaling’ window.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Troubleshooting in Polyspace Products for Ada 的更多信息

产品


版本

R2012a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by