History log of /llvm-project/llvm/test/Analysis/CtxProfAnalysis/full-cycle.ll (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# b15845c0 16-Jan-2025 Mircea Trofin <mtrofin@google.com>

[ctxprof] dump profiles using yaml (for testing) (#123108)

This is a follow-up from PR #122545, which enabled converting yaml to contextual profiles.

This change uses the lower level yaml APIs bec

[ctxprof] dump profiles using yaml (for testing) (#123108)

This is a follow-up from PR #122545, which enabled converting yaml to contextual profiles.

This change uses the lower level yaml APIs because:
- the mapping APIs `llvm::yaml` offers don't work with `const` values, because they (the APIs) want to enable both serialization and deserialization
- building a helper data structure would be an alternative, but it'd be either memory-consuming or overly-complex design, given the recursive nature of the contextual profiles.

show more ...


Revision tags: llvmorg-19.1.7
# 63293558 11-Jan-2025 Mircea Trofin <mtrofin@google.com>

[ctxprof] Move test serialization to yaml (#122545)

We have a textual representation of contextual profiles for test scenarios, mainly. This patch moves that to YAML instead of JSON. YAML is more su

[ctxprof] Move test serialization to yaml (#122545)

We have a textual representation of contextual profiles for test scenarios, mainly. This patch moves that to YAML instead of JSON. YAML is more succinct and readable (some of the .ll tests should be illustrative). In addition, JSON is parse-able by the YAML reader.

A subsequent patch will address deserialization.

(thanks, @kazutakahirata, for showing me how to use the llvm YAML reader/writer APIs, which I incorrectly thought to be more low-level than the JSON ones!)

show more ...


Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0
# fe6c0250 07-Sep-2024 Mircea Trofin <mtrofin@google.com>

[nfc][ctx_prof] Fix the second source of nondeterminism in `CtxProfAnalysisPrinterPass`

Verified on a build with `LLVM_REVERSE_ITERATION=ON`

Issue #106855


# 644c9020 07-Sep-2024 Mircea Trofin <mtrofin@google.com>

[ctx_prof] Fix nondeterminism in CtxProfAnalysisPrinterPass

Using a `std::map` instead of a `DenseMap` for the FuncInfo
member.

Addresses the ctx_prof part of Issue #106855


# 32097666 03-Sep-2024 Mircea Trofin <mtrofin@google.com>

[ctx_prof] Add Inlining support (#106154)

Add an overload of `InlineFunction` that updates the contextual profile. If there is no contextual profile, this overload is equivalent to the non-contextua

[ctx_prof] Add Inlining support (#106154)

Add an overload of `InlineFunction` that updates the contextual profile. If there is no contextual profile, this overload is equivalent to the non-contextual profile variant.

Post-inlining, the update mainly consists of:
- making the PGO instrumentation of the callee "the caller's": the owner function (the "name" parameter of the instrumentation instructions) becomes the caller, and new index values are allocated for each of the callee's indices (this happens for both increment and callsite instrumentation instructions)
- in the contextual profile:
- each context corresponding to the caller has its counters updated to incorporate the counters inherited from the callee at the inlined callsite. Counter values are copied as-is because no scaling is required since the profile is contextual.
- the contexts of the callee (at the inlined callsite) are moved to the caller.
- the callee context at the inlined callsite is deleted.

show more ...


Revision tags: llvmorg-19.1.0-rc4
# 22d3fb18 21-Aug-2024 Mircea Trofin <mtrofin@google.com>

[ctx_prof] Profile flatterner (#104539)

Eventually we'll need to flatten the profile (at the end of all IPO) and lower to "vanilla" `MD_prof`. This is the first part of that.

Issue #89287


Revision tags: llvmorg-19.1.0-rc3
# aca01bff 15-Aug-2024 Mircea Trofin <mtrofin@google.com>

[ctx_prof] CtxProfAnalysis: populate module data (#102930)

Continuing from #102084, which introduced the analysis, we now populate
it with info about functions contained in the module.

When we w

[ctx_prof] CtxProfAnalysis: populate module data (#102930)

Continuing from #102084, which introduced the analysis, we now populate
it with info about functions contained in the module.

When we will update the profile due to e.g. inlined callsites, we'll
ingest the callee's counters and callsites to the caller. We'll move
those to the caller's respective index space (counter and callers), so
we need to know and maintain where those currently end.

We also don't need to keep profiles not pertinent to this module.

This patch also introduces an arguably much simpler way to track the
GUID of a function from the frontend compilation, through ThinLTO, and
into the post-thinlink compilation step, which doesn't rely on keeping
names around. A separate RFC and patches will discuss extending this to
the current PGO (instrumented and sampled) and other consumers as an
infrastructural component.

show more ...