[PATCH] D115764: [NFC] Expose the ReleaseModeModelRunner

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 21:58:01 PST 2021


mtrofin marked an inline comment as done.
mtrofin added inline comments.


================
Comment at: llvm/include/llvm/Analysis/ReleaseModeModelRunner.h:29
+  template <class FType>
+  ReleaseModeModelRunner(LLVMContext &Ctx, const FType &FeatureNames,
+                         StringRef DecisionName, StringRef FeedPrefix = "feed_",
----------------
yundiqian wrote:
> what's the concern for just use std::vector?
Feature lists are compile-time known. We use std::array for example for the list of the inliner, it's overall cheaper. we can't though use it as a parameter here because we don't know the count (plus it's not fixed, it's per instantiation of this template)

we could do 

`template <std::size_t N>
ReleaseModeModelRunner(... const std::array<std::string, N>&...), `

but I prefer the current choice, it's more flexible and doesn't make any significant tradeoffs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115764/new/

https://reviews.llvm.org/D115764



More information about the llvm-commits mailing list