[llvm] [llvm-profdata] Default to MemProf version 3 (PR #108863)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 10:29:57 PDT 2024


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/108863

It's very confusing to have support for Verion 3 but not default to
it.  This patch teaches llvm-profdata to use MemProf version 3 by
default.


>From 2a8c150f042fa911520f7c033fd0c2539589bfb1 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Mon, 16 Sep 2024 10:22:52 -0700
Subject: [PATCH] [llvm-profdata] Default to MemProf version 3

It's very confusing to have support for Verion 3 but not default to
it.  This patch teaches llvm-profdata to use MemProf version 3 by
default.
---
 llvm/tools/llvm-profdata/llvm-profdata.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index 5efef97cc57878..1dbe39a3f3699c 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -332,7 +332,7 @@ cl::opt<bool> DoWritePrevVersion(
 cl::opt<memprof::IndexedVersion> MemProfVersionRequested(
     "memprof-version", cl::Hidden, cl::sub(MergeSubcommand),
     cl::desc("Specify the version of the memprof format to use"),
-    cl::init(memprof::Version0),
+    cl::init(memprof::Version3),
     cl::values(clEnumValN(memprof::Version0, "0", "version 0"),
                clEnumValN(memprof::Version1, "1", "version 1"),
                clEnumValN(memprof::Version2, "2", "version 2"),



More information about the llvm-commits mailing list