[clang] Improve stack usage to increase recursive initialization depth (PR #88546)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 15 15:14:01 PDT 2024


================
@@ -1070,57 +1077,24 @@ class Sema;
     };
 
   private:
-    SmallVector<OverloadCandidate, 16> Candidates;
-    llvm::SmallPtrSet<uintptr_t, 16> Functions;
-
-    // Allocator for ConversionSequenceLists. We store the first few of these
-    // inline to avoid allocation for small sets.
-    llvm::BumpPtrAllocator SlabAllocator;
+    ASTContext &Ctx;
+    SmallVector<OverloadCandidate, 4> Candidates;
+    llvm::SmallPtrSet<uintptr_t, 4> Functions;
----------------
mizvekov wrote:

pre-existing small nit, for consistency:
```suggestion
    SmallVector<OverloadCandidate, 4> Candidates;
    SmallPtrSet<uintptr_t, 4> Functions;
```

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


More information about the cfe-commits mailing list