This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Expose the ReleaseModeModelRunner
ClosedPublic

Authored by mtrofin on Dec 14 2021, 4:16 PM.

Details

Summary

The type was pretty much generic, just needed a bit of parameterization.

Diff Detail

Event Timeline

mtrofin created this revision.Dec 14 2021, 4:16 PM
mtrofin requested review of this revision.Dec 14 2021, 4:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 14 2021, 4:16 PM
yundiqian added inline comments.Dec 14 2021, 9:10 PM
llvm/include/llvm/Analysis/ReleaseModeModelRunner.h
30

what's the concern for just use std::vector?

mtrofin marked an inline comment as done.Dec 14 2021, 9:58 PM
mtrofin added inline comments.
llvm/include/llvm/Analysis/ReleaseModeModelRunner.h
30

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.

yundiqian accepted this revision.Dec 14 2021, 10:10 PM
This revision is now accepted and ready to land.Dec 14 2021, 10:10 PM
This revision was landed with ongoing or failed builds.Dec 15 2021, 11:22 PM
This revision was automatically updated to reflect the committed changes.
mtrofin marked an inline comment as done.
llvm/lib/Analysis/MLInlineAdvisor.cpp