huangjd wrote:
> @huangjd, I'm not sure the buildbot emails on failure are working, but the
> test you added seems to be failing on many bots. Can you take a look and
> revert if you need time to investigate?
>
> * https://lab.llvm.org/buildbot/#/builders/144/builds/163
> * https://lab.llvm.or
https://github.com/huangjd created
https://github.com/llvm/llvm-project/pull/95637
Fix test case in #95298 because another recent submitted patch removed llvm.dbg
intrinsics, updated test case accordingly
>From 5fafbda01e5bf10b898f71b38305485e57e5b13f Mon Sep 17 00:00:00 2001
From: William Hua
https://github.com/huangjd closed
https://github.com/llvm/llvm-project/pull/95298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5746,6 +5746,57 @@ void
CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var,
Var->addDebugInfo(GVE);
}
+void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder,
+ llvm::Instruction *Value, QualType Ty) {
+ // Only when -g2
@@ -5746,6 +5746,57 @@ void
CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var,
Var->addDebugInfo(GVE);
}
+void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder,
+ llvm::Instruction *Value, QualType Ty) {
+ // Only when -g2
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/95298
>From 0c49ae55b4b05a9c701288f106c138cab4af37f0 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Wed, 12 Jun 2024 03:48:51 -0400
Subject: [PATCH 1/2] (New) Add option to generate additional debug info for
expre
huangjd wrote:
It seems the restriction for dbg.value appearing in the front end was lifted
recently, so now I can just emit dbg.value directly
https://github.com/llvm/llvm-project/pull/95298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/huangjd created
https://github.com/llvm/llvm-project/pull/95298
This is a different implementation to #94100, which has been reverted.
When -fdebug-info-for-profiling is specified, for any Load expression if the
pointer operand is not a declared variable, clang will emit deb
https://github.com/huangjd closed
https://github.com/llvm/llvm-project/pull/95174
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/huangjd created
https://github.com/llvm/llvm-project/pull/95174
The option is causing the binary output to be different when compiled under
`-O0`, because it introduce dbg.declare on pseudovariables. Going to change
this implementation to use dbg.value instead.
>From c7
huangjd wrote:
Ok lets revert this first, and I will work on the dbg.value implementation
https://github.com/llvm/llvm-project/pull/94100
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
huangjd wrote:
By just specifying `-g` Even without `-fdebug-info-for-profiling` it is going
to introduce debug variables as a sequence of alloca-store-load too, so is it a
requirement to guarantee `-O0` output stays identical with or without debug
info?
Emitting a dbg.value was what I origi
https://github.com/huangjd closed
https://github.com/llvm/llvm-project/pull/94100
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/huangjd created
https://github.com/llvm/llvm-project/pull/94100
This is another attempt to land #81545, which was reverted.
Fixed test case so that it is consistent on all platforms.
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huan
huangjd wrote:
How do I reopen the PR after fixing the test case?
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/huangjd closed
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
huangjd wrote:
Could I have a follow up on this? @dwblaikie
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5636,6 +5636,84 @@ void
CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var,
Var->addDebugInfo(GVE);
}
+void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder,
+ llvm::Instruction *Value, QualType Ty) {
+ // Only when -g2
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 01/13] Add option to generate additional info for expression
cont
https://github.com/huangjd ready_for_review
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/huangjd converted_to_draft
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5636,6 +5636,84 @@ void
CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var,
Var->addDebugInfo(GVE);
}
+void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder,
+ llvm::Instruction *Value, QualType Ty) {
+ // Only when -g2
@@ -5636,6 +5636,84 @@ void
CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var,
Var->addDebugInfo(GVE);
}
+void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder,
+ llvm::Instruction *Value, QualType Ty) {
+ // Only when -g2
@@ -1787,7 +1787,26 @@ Value *ScalarExprEmitter::VisitMemberExpr(MemberExpr *E)
{
}
}
- return EmitLoadOfLValue(E);
+ llvm::Value *Result = EmitLoadOfLValue(E);
+
+ // If -fdebug_info_for_profiling is specified, emit a pseudo variable and its
huangjd
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 01/12] Add option to generate additional info for expression
cont
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 01/11] Add option to generate additional info for expression
cont
huangjd wrote:
I am making another diff (not to be submitted) to get statistics on how
frequently these 2 cases are encountered
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
huangjd wrote:
> > > Reading LLVM IR lit CHECK lines from clang codegen is a bit difficult -
> > > could you include some simple examples (perhaps from the new clang tests
> > > in this patch) showing the DWARF output just as comments in this review
> > > for something more easily glanceable?
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 1/9] Add option to generate additional info for expression
contai
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 1/8] Add option to generate additional info for expression
contai
huangjd wrote:
> Reading LLVM IR lit CHECK lines from clang codegen is a bit difficult - could
> you include some simple examples (perhaps from the new clang tests in this
> patch) showing the DWARF output just as comments in this review for something
> more easily glanceable?
Attached is the
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 1/7] Add option to generate additional info for expression
contai
huangjd wrote:
My concern to enable this feature by default is that there are some less known
syntax (probably from other supported languages or extensions) that has a
MemberExpr but actually emitting something unexpected, which could cause a
crash. I am testing this feature on some real-life
huangjd wrote:
So the additional debug info for pointer type should be generated when
-fdebug-info-for-profiling is enabled?
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
https://github.com/huangjd ready_for_review
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 1/5] Add option to generate additional info for expression
contai
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 1/4] Add option to generate additional info for expression
contai
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 1/3] Add option to generate additional info for expression
contai
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/81545
>From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Mon, 12 Feb 2024 02:27:13 -0500
Subject: [PATCH 1/2] Add option to generate additional info for expression
contai
https://github.com/huangjd created
https://github.com/llvm/llvm-project/pull/81545
Such expression does not correspond to a variable in the source code thus does
not have a debug location. When the user collects perf data on the program, if
the intermediate memory load instruction is sampled,
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -0,0 +1,129 @@
+//===--- HashKeyMap.h - Wrapper for maps using hash value key ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,129 @@
+//===--- HashKeyMap.h - Wrapper for maps using hash value key ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -902,12 +890,16 @@ std::error_code
SampleProfileReaderExtBinaryBase::readFuncProfiles() {
for (const auto &NameOffset : FuncOffsetList) {
const auto &FContext = NameOffset.first;
auto FName = FContext.getName();
+StringRef FNameString;
+
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -85,7 +86,7 @@ class ProfiledCallGraph {
std::queue Queue;
for (auto &Child : ContextTracker.getRootContext().getAllChildContext()) {
ContextTrieNode *Callee = &Child.second;
- addProfiledFunction(ContextTracker.getFuncNameFor(Callee));
+ addProfiledF
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,226 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -85,7 +86,7 @@ class ProfiledCallGraph {
std::queue Queue;
for (auto &Child : ContextTracker.getRootContext().getAllChildContext()) {
ContextTrieNode *Callee = &Child.second;
- addProfiledFunction(ContextTracker.getFuncNameFor(Callee));
+ addProfiledF
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -85,7 +86,7 @@ class ProfiledCallGraph {
std::queue Queue;
for (auto &Child : ContextTracker.getRootContext().getAllChildContext()) {
ContextTrieNode *Callee = &Child.second;
- addProfiledFunction(ContextTracker.getFuncNameFor(Callee));
+ addProfiledF
@@ -0,0 +1,226 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
@@ -0,0 +1,222 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
huangjd wrote:
It looks like after using HashKeyMap, the purpose of SymbolMap and
GUIDToFuncNameMap can be merged. SymbolMap maps StringRef to Function*,
GUIDToFuncNameMap maps ProfileFuncRef's hash code to StringRef, and it's almost
exclusively cascaded to SymbolMap lookup, so we can actually
huangjd wrote:
It looks like after using HashKeyMap, the purpose of SymbolMap and
GUIDToFuncNameMap can be merged. SymbolMap maps StringRef to Function*,
GUIDToFuncNameMap maps ProfileFuncRef's hash code to StringRef, and it's almost
exclusively cascaded to SymbolMap lookup, so we can actually
huangjd wrote:
> > There are two ways ProfileFuncRef can originate (ignoring copy
> > constructions):
> > ...
>
> So you are saying there can be hashcode `ProfileFuncRef`s coming from the
> profile, but an `llvm::Function` would always produce a string
> `ProfileFuncRef`?
>
> > B - Whenever
huangjd wrote:
To clarify the implementation of ProfileFuncRef and how it guarantees
correctness.
There are two ways ProfileFuncRef can originate (ignoring copy constructions):
1 - From reading the profile, in which all ProfileFuncRef should have the same
representation (either StringRef or M
huangjd wrote:
To clarify the implementation of ProfileFuncRef and how it guarantees
correctness.
There are two ways ProfileFuncRef can originate (ignoring copy constructions):
1 - From reading the profile, in which all ProfileFuncRef should have the same
representation (either StringRef or M
huangjd wrote:
Full profile load is further reduced to 24s after optimizing lazy loading of
name table, which was a bottleneck
https://github.com/llvm/llvm-project/pull/66164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
huangjd wrote:
I will hold on renaming variables to a different patch because this will change
files everywhere, may cause confusion to review in this patch.
https://github.com/llvm/llvm-project/pull/66164
___
cfe-commits mailing list
cfe-commits@lis
@@ -0,0 +1,225 @@
+//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2
huangjd wrote:
Added performance measurement. This patch does significantly reduce profile
load time, which is its motivation
https://github.com/llvm/llvm-project/pull/66164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
huangjd wrote:
Added performance measurement. This patch does significantly reduce profile
load time, which is its motivation
https://github.com/llvm/llvm-project/pull/66164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
https://github.com/huangjd edited
https://github.com/llvm/llvm-project/pull/66164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/huangjd edited
https://github.com/llvm/llvm-project/pull/66164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/66164
>From dcaa197c8b4e80fba83fc3905b0488a44fe89cc5 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Fri, 15 Sep 2023 23:08:46 +
Subject: [PATCH 1/2] Rebase with main
---
.../include/llvm/ProfileData/ProfileFu
https://github.com/huangjd updated
https://github.com/llvm/llvm-project/pull/66164
>From dcaa197c8b4e80fba83fc3905b0488a44fe89cc5 Mon Sep 17 00:00:00 2001
From: William Huang
Date: Fri, 15 Sep 2023 23:08:46 +
Subject: [PATCH] Rebase with main
---
.../include/llvm/ProfileData/ProfileFuncRe
73 matches
Mail list logo