[llvm] [PGO] Add llvm.loop.estimated_trip_count metadata (PR #152775)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 03:55:54 PDT 2025
================
@@ -7966,6 +7966,54 @@ The attributes in this metadata are added to all followup loops of the
loop distribution pass. See
:ref:`Transformation Metadata <transformation-metadata>` for details.
+'``llvm.loop.estimated_trip_count``' Metadata
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This metadata records an estimated trip count for the loop. The first operand
+is the string ``llvm.loop.estimated_trip_count``. The second operand is an
+integer constant of type ``i32`` or smaller specifying the estimate. For
----------------
nikic wrote:
What's the motivation for allowing "or smaller"?
https://github.com/llvm/llvm-project/pull/152775
More information about the llvm-commits
mailing list