I've seen gcc do an enthusiastic job on `static` functions within a C compilation unit - specifically where they only have one call site and so can be fully inlined into the caller.
In that case, the code did become pretty hard to debug due to the extensive inlining and reordering it had allowed. Unfortunate because the only reason such functions exist is to make the structure of the code more apparent!
Maybe that's an exception (and / or maybe it's easier with C than for C++).
Maybe the less is that it's still always worth trying function call boundaries, in case the compiler has been conservative!