[llvm] [Support] Optimize parallel `TaskGroup` (PR #189196)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 29 10:00:28 PDT 2026


================
@@ -39,19 +39,8 @@ namespace detail {
 
 namespace {
 
-/// An abstract class that takes closures and runs them asynchronously.
-class Executor {
-public:
-  virtual ~Executor() = default;
-  virtual void add(std::function<void()> func) = 0;
-  virtual size_t getThreadCount() const = 0;
-
-  static Executor *getDefaultExecutor();
-};
-
-/// An implementation of an Executor that runs closures on a thread pool
-///   in filo order.
-class ThreadPoolExecutor : public Executor {
+/// Runs closures on a thread pool in filo order.
+class ThreadPoolExecutor {
----------------
aganea wrote:

Intuitively I would split this refactoring in a prior NFC commit, just to reduce the surface of this change.

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


More information about the llvm-commits mailing list