0

If multi-file IPO (also commonly known as link-time optimization) is being used with icc, is it possible that code can be optimized across the C and C++ language boundary?

For example, can a C function be inlined into a C++ caller?

This has been tested to work for clang and gcc but the LTO mechanism is somewhat different for icc is somewhat different.

BeeOnRope
  • 60,350
  • 16
  • 207
  • 386
  • 2
    I'm not comfortable with 4 very closely related questions being asked in a matter of minutes. (The complete set, including this, are: https://stackoverflow.com/questions/48030795/, https://stackoverflow.com/questions/48030786/, https://stackoverflow.com/questions/48030706/, https://stackoverflow.com/questions/48030818/). I can't help but feel that a single question about which of the 4 compilers can do it would be better. It feels like a 'rep grubbing' ploy. Maybe that's harsh, but… – Jonathan Leffler Dec 30 '17 at 04:21
  • Yeah it's rather odd. These questions don't have enough content to warrant them being separate questions. – Tanner Babcock Dec 30 '17 at 07:45
  • @TannerBabcock - I originally created a single question targeting multiple compilers, but there were complaints and I was asked to create multiple questions, one per compiler. Then of course there were further complaints about that approach. The main discussion is in the [comments to the original question](https://stackoverflow.com/q/48030706/149138). Your premise that this doesn't have enough "content" to warrant separate questions seems false though. The question is succinct and clear, it doesn't need more content. Maybe you mean enough "difference" from the other questions? – BeeOnRope Dec 30 '17 at 18:28
  • The original question is perfectly OK. The call to ask multiple questions is misguided at best. I recommend to delete the duplicates. – n. m. could be an AI Dec 30 '17 at 19:10
  • @n.m. - at this point I'm just going to leave it as is. We can bike-shed this all the way into 2018 if we want, but I've already changed it twice based on "recommendations" and there just isn't any solution that leaves everyone happy. Furthermore, other than the "icc" variant, the remaining questions all have reasonable answers and it wouldn't be fair (for example) to the person who already has the accepted answer for "gcc" and "clang" to go back and overload that question with two other compilers that they probably don't even have. It's _good enough_ as it is, and there is no _perfect_ here. – BeeOnRope Dec 30 '17 at 19:36

0 Answers0