[llvm] 9692688 - [MemProf] Don't use constexpr via lambda capture due to MSVC issues (NFC)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 23 15:04:04 PDT 2023
Author: Teresa Johnson
Date: 2023-04-23T15:03:49-07:00
New Revision: 969268831b9e409dd66af10c12fe17431e09b70f
URL: https://github.com/llvm/llvm-project/commit/969268831b9e409dd66af10c12fe17431e09b70f
DIFF: https://github.com/llvm/llvm-project/commit/969268831b9e409dd66af10c12fe17431e09b70f.diff
LOG: [MemProf] Don't use constexpr via lambda capture due to MSVC issues (NFC)
Modifies a104e27030587507a711cef0e2b0ddb447fe68fe slightly to switch a
constexpr used via a lambda capture to a const, due to issues with MSVC.
See https://reviews.llvm.org/D140949#inline-1438809 for context.
Added:
Modified:
llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
index e6798e18982c9..5c8aaddfe3bb3 100644
--- a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+++ b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
@@ -2001,9 +2001,9 @@ void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::identifyClones(
//
// We shouldn't actually have any None type edges, so the sorting priority for
// that is arbitrary, and we assert in that case below.
- constexpr unsigned AllocTypeCloningPriority[] = {/*None*/ 3, /*NotCold*/ 4,
- /*Cold*/ 1,
- /*NotColdCold*/ 2};
+ const unsigned AllocTypeCloningPriority[] = {/*None*/ 3, /*NotCold*/ 4,
+ /*Cold*/ 1,
+ /*NotColdCold*/ 2};
assert(std::size(AllocTypeCloningPriority) ==
(std::size_t)AllocationType::All + 1);
std::stable_sort(Node->CallerEdges.begin(), Node->CallerEdges.end(),
More information about the llvm-commits
mailing list