[llvm] [FuncSpec] Adjust the names of specializations and promoted stack val… (PR #66685)

Chuanqi Xu via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 19:43:04 PDT 2023


================
@@ -252,6 +252,7 @@ class FunctionSpecializer {
   SmallPtrSet<Function *, 32> FullySpecialized;
   DenseMap<Function *, CodeMetrics> FunctionMetrics;
   DenseMap<Function *, unsigned> FunctionGrowth;
+  unsigned NGlobals;
----------------
ChuanqiXu9 wrote:

```suggestion
  unsigned NGlobals = 0;
```

Leave it uninitialized may be a UB.

https://github.com/llvm/llvm-project/pull/66685


More information about the llvm-commits mailing list