This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::pow implementation


Richard Earnshaw wrote:
When I say "inline", I mean inline, regardless of other opinions (including those of the compiler).

Really? And when you say "register" do you really mean that? If so, then I'm sorry, but you are in for a big disappointment when using gcc -- it completely ignores the register keyword when optimizing and has done since ~forever.

Yes -- but as others have pointed out, automatic register allocation is a well-defined discipline that has proven itself. I have seen much evidence (including the original basis for this thread) that automatic inliners are still primitive.

One root of this dicussion is differences in definitions (and expectations) between C, Ada, and C++.

I've already given examples of when the compiler can make use of
context to give better inlining than can be determined statically.
Your "arrogant" assertion that inline must always and unconditionally
mean inline impliess that programmers can never take advantage of
those cases.

No; I imply that a C++ compiler should do as it's told, and explain itself when it makes a contrary decision. I don't doubt that the compiler can find optimizations that are beyond my analysis; I also know compilers can (and do) generate bad code.


--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]