ΣSigmaStudio Ask AI Русский Log in

inline functions funpack(), fpack() considered to large for inlining

Processors & DSP MisterB Jul 6, 2011 00:00 6 replies Original on forum ↗
Subscribe
MisterB Question
Jul 6, 2011 00:00

Hi,

I'm using VisualDSP++ 5.0.8 for SHARC 21469. When I switch on compiler remarks with -Wremarks compiler switch, I see remark cc1461 "Compiler Remark: function call inlined despite compiler considering unsuitable for inlining" when using the intrinsic functions fpack() and funpack(). Silly question: Why considers the compiler the fpack() and funpack() unsuitable for inlining? It is only one assembly instruction. :-)

This behaviour of the compiler is very inconvenient, because I use fpack(), funpack() very often in my code. For this reason lots of these remarks occur while compiling. It's rather easy to miss some important remark. Because I switched on MISRA C checking, the #pragma diag statement can't be used.

Regards,

Michael

StuartS Reply
Jul 8, 2011 00:00

Hi Michael,

I understand your point but I've not been able to reproduce it. Do you have a smallish example source file you post that demonstrates the remark.

Thanks,

Stuart.

MisterB Reply
Jul 11, 2011 00:00

Hi Stuart,

find attached an example project. Please compile target "DebugNWC".

Regards,

Michael

ADIApproved Reply
Aug 1, 2011 00:00

Hi,

using the example you provided, I could not reproduce the remarks you are seeing, either with Update 8 or with the latest update, Update 9.1. The Compiler issues the following two remarks when compiling this example in Debug NWC:

".\inline-funpack.c", line 20 (col. 29): cc1461: {D} remark: inlining funpack

".\inline-funpack.c", line 22 (col. 27): cc1461: {D} remark: inlining fpack

We may need to check your version information more closely. As the VisualDSP++ "Product Info" HTML file contains licensing information, could I ask you to contact private support through the link below, and include a link to this thread:

http://www.analog.com/processor/support

Regards,

Craig.

StuartS Reply
Aug 1, 2011 00:00

Hi Michael,

The help text for cc1461 is wrong. The cc1461 remark is issued as an informational message to indicate that the compiler has inlined a function. It's not conditional on any costing or gain considerations and as far as we can determine it never has been (which is a bit of a mystery we need to investigate).

For example, the same remark is issued for the simplest of inline functions as seen below:

[edin-forres:~] cat t.c
inline void foo(void) {
}

void bar(void) {
foo();
}

[edin-forres:~] ccblkfn.exe -Wremarks -O t.c -S
"t.c", line 5 (col. 6): cc1461: {D} remark: inlining foo

We'll fix the cc1461 text in a future update of the compiler message documentation (our reference is TAR-47014) but rest assured we are certain that you can safely ignore it.

Regards,

Stuart.

MisterB Reply
Aug 1, 2011 00:00

Dear Craig,

the remark you got is the behaviour, I described in my first posting.

You mentioned, you got the following remarks:

".\inline-funpack.c", line 20 (col. 29): cc1461: {D} remark: inlining funpack

".\inline-funpack.c", line 22 (col. 27): cc1461: {D} remark: inlining fpack

VisualDSP help tells me for cc1461:

Compiler Remark: function call inlined despite compiler considering unsuitable for inlining

Description: This remark is raised when the compiler has been forced to inline a function call when the compiler considers the function unsuitably large for inlining. This occurs when the function in question is defined using #pragma always_inline or the –always-inline switch is passed to the compiler.

So here is my question again: Why does the C-compiler consider funpack()/fpack() unsuitable for inlining? They are intrinsic functions with (in theory) only one assembly instruction.

Best regards,

Michael

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin