GraalVM PGO and user hints (likely/unlikely) for the originally native code #7990
Unanswered
zamazan4ik
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I understand the documentation correctly, GraalVM can apply its own PGO implementation for the LLVM bitcode too. C, C++, and Rust have an ability to specify
likely
/unlikely
branches for the code via compiler intrinsic or even a standard way (e.g. in C++ - https://en.cppreference.com/w/cpp/language/attributes/likely).How GraalVM does interact with such modifiers in the original code? Let's imagine the situation when GraalVM PGO profiling shows that a user made a mistake with
likely
attribute and placed it for the cold branch. Which decision will have higher priority - user-definedlikely
attribute or the GraalVM decision based on its PGO profile?What if my LLVM bitcode is already PGO optimized (via LLVM PGO infrastructure) and for this optimized version GraalVM applies its PGO optimization step? Am I right that GraalVM can choose other optimization options and decide to optimize the already PGO-optimized LLVM code somehow in another way (e.g. were different training workloads for LLVM PGO and GraalVM PGO).
Beta Was this translation helpful? Give feedback.
All reactions