I meant to add (but hit Send too soon), I am not as much concerned about *how* the inlining is done as I am in getting the compiler to TELL me that it inlined some functions, and where that was done.
It would be nice to be able to bypass some procedural code inside a function when it is inlined as opposed to when it is NOT inlined (or even the reverse, ADD come code when inlined), but I know that is wishful thinking. Peter -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Farley, Peter Sent: Friday, February 10, 2023 12:47 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How to get MetalC "INLINE" report AFAIK, not the way inlining works on any z/OS compiler output I have ever seen. Recent versions of Enterprise COBOL, for instance, can inline performed paragraphs (and tell you that they did so) such that no HLL debugger known to me can let you stop inside the inlined code. If you have to debug E.COBOL inlined code you must recompile with the NOINLINE compiler option (or in the worst cases, NOOPT). Peter -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Paul Gilmartin Sent: Friday, February 10, 2023 12:25 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How to get MetalC "INLINE" report On Fri, 10 Feb 2023 16:58:49 +0000, Farley, Peter wrote: >I have been writing some MetalC programs and ran into a case where the normal >OPTIMIZE setting (OPT(2)) provably inlined a couple of small functions. It is >not immediately obvious in the MetalC ASM output, but when the functions are >inlined there is no entry point for them, no FPB or FEPM compiler control data >generated for them, etc. > ... That's just wrong. Even if the compiler intends to generate inline code for calls to a function, it should generate an externally callable entry name, perhaps to an inline code body, regardless of optimization level. SR. The modifier "static" has a flavor of "not external", and might be used to declare an inline-only function. -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN