Skip to content

Commit 2054d4a

Browse files
committed
Address comments from teresajohnson
1 parent d75c88f commit 2054d4a

File tree

1 file changed

+12
-3
lines changed
  • llvm/include/llvm/LTO

1 file changed

+12
-3
lines changed

llvm/include/llvm/LTO/LTO.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,22 @@ class ThinBackendProc {
241241
const std::string &NewModulePath) const;
242242
};
243243

244-
/// A ThinBackend defines what happens after the thin-link phase during ThinLTO.
245-
/// The details of this type definition aren't important; clients can only
246-
/// create a ThinBackend using one of the create*ThinBackend() functions below.
244+
/// This callable defines the behavior of a ThinLTO backend after the thin-link
245+
/// phase. It accepts a configuration \p C, a combined module summary index
246+
/// \p CombinedIndex, a map of module identifiers to global variable summaries
247+
/// \p ModuleToDefinedGVSummaries, a function to add output streams \p
248+
/// AddStream, and a file cache \p Cache. It returns a unique pointer to a
249+
/// ThinBackendProc, which can be used to launch backends in parallel.
247250
using ThinBackendFunction = std::function<std::unique_ptr<ThinBackendProc>(
248251
const Config &C, ModuleSummaryIndex &CombinedIndex,
249252
const DenseMap<StringRef, GVSummaryMapTy> &ModuleToDefinedGVSummaries,
250253
AddStreamFn AddStream, FileCache Cache)>;
254+
255+
/// This type defines the behavior following the thin-link phase during ThinLTO.
256+
/// It encapsulates a backend function and a strategy for thread pool
257+
/// parallelism. Clients should use one of the provided create*ThinBackend()
258+
/// functions to instantiate a ThinBackend. Parallelism defines the thread pool
259+
/// strategy to be used for processing.
251260
struct ThinBackend {
252261
ThinBackend(ThinBackendFunction Func, ThreadPoolStrategy Parallelism)
253262
: Func(std::move(Func)), Parallelism(std::move(Parallelism)) {}

0 commit comments

Comments
 (0)