[all-commits] [llvm/llvm-project] 632935: [ctxprof] Move test serialization to yaml (#122545)

Mircea Trofin via All-commits all-commits at lists.llvm.org
Fri Jan 10 18:04:47 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6329355860e9b66bc7ed68b46c166763e408d4cc
      https://github.com/llvm/llvm-project/commit/6329355860e9b66bc7ed68b46c166763e408d4cc
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2025-01-10 (Fri, 10 Jan 2025)

  Changed paths:
    M llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
    M llvm/lib/ProfileData/PGOCtxProfWriter.cpp
    M llvm/test/Analysis/CtxProfAnalysis/flatten-and-annotate.ll
    M llvm/test/Analysis/CtxProfAnalysis/flatten-check-path.ll
    M llvm/test/Analysis/CtxProfAnalysis/flatten-icp.ll
    M llvm/test/Analysis/CtxProfAnalysis/flatten-zero-path.ll
    M llvm/test/Analysis/CtxProfAnalysis/full-cycle.ll
    M llvm/test/Analysis/CtxProfAnalysis/handle-select.ll
    M llvm/test/Analysis/CtxProfAnalysis/inline.ll
    M llvm/test/Analysis/CtxProfAnalysis/load-unapplicable.ll
    M llvm/test/Analysis/CtxProfAnalysis/load.ll
    M llvm/test/ThinLTO/X86/ctxprof.ll
    M llvm/test/Transforms/EliminateAvailableExternally/transform-to-local.ll
    R llvm/test/tools/llvm-ctxprof-util/Inputs/bad.json
    A llvm/test/tools/llvm-ctxprof-util/Inputs/bad.yaml
    R llvm/test/tools/llvm-ctxprof-util/Inputs/empty.json
    A llvm/test/tools/llvm-ctxprof-util/Inputs/empty.yaml
    R llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-bad-subctx.json
    A llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-bad-subctx.yaml
    R llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-no-counters.json
    A llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-no-counters.yaml
    R llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-no-ctx.json
    A llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-no-ctx.yaml
    R llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-no-vector.json
    A llvm/test/tools/llvm-ctxprof-util/Inputs/invalid-no-vector.yaml
    R llvm/test/tools/llvm-ctxprof-util/Inputs/valid.json
    A llvm/test/tools/llvm-ctxprof-util/Inputs/valid.yaml
    M llvm/test/tools/llvm-ctxprof-util/llvm-ctxprof-util-negative.test
    M llvm/test/tools/llvm-ctxprof-util/llvm-ctxprof-util.test
    M llvm/tools/llvm-ctxprof-util/llvm-ctxprof-util.cpp
    M llvm/unittests/Transforms/Utils/CallPromotionUtilsTest.cpp

  Log Message:
  -----------
  [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!)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list