[PATCH] D15289: Avoid inlining CallSites leading to unreachable

Andy Ayers via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 12:20:33 PST 2015


AndyAyers added a comment.

Note on windows "main" may be "wmain" "WinMain" "WINMAIN" "MAIN" "AfxWinMain"  "ENTGQQ" etc.

I've tried doing things like this in the past and it is tricky to get right outside of benchmarks. For instance we had performance-sensitive loops postdominated by calls to exit(). (And if you think interprocedurally, everything is generally postdominated by a very infrequently taken exit point).

Using BPI or similar is better in that at least all the parts of the framework can agree on the criteria for what is relative hot and what is relatively cold. As I told our devs, if you think you know better, please work to enhance the static heuristics or the profile count maintenance so every part of the code can benefit.

Also there are lots of cases where inlining in cold paths is helpful to improving CQ on hot paths. But that's a discussion for another day, perhaps.


http://reviews.llvm.org/D15289





More information about the llvm-commits mailing list