[llvm] [NFC] Fix comments in PassBuilder functions (PR #89513)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 20 14:46:41 PDT 2024


https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/89513

The original comments mention `addPreLinkLTODefaultPipeline`, but I could not find any functions with this name, even in https://reviews.llvm.org/D33540 (8b3be4e59d861130746206e41ae42c918bc165df) where this comment was added. I assume they meant to refer to `buildThinLTOPreLinkDefaultPipeline` and `buildLTOPreLinkDefaultPipeline` and so this patch uses them.

>From 879d8f2712a0833facf1c1b82bb6e744526bbcec Mon Sep 17 00:00:00 2001
From: Ellis Hoag <ellis.sparky.hoag at gmail.com>
Date: Sat, 20 Apr 2024 14:40:24 -0700
Subject: [PATCH] [NFC] Fix comments in PassBuilder functions

The original comments mention `addPreLinkLTODefaultPipeline`, but I could not find any functions with this name, even in https://reviews.llvm.org/D33540 where this comment was added. I assume they meant to refer to `buildThinLTOPreLinkDefaultPipeline` and `buildLTOPreLinkDefaultPipeline` and so this patch uses them.
---
 llvm/include/llvm/Passes/PassBuilder.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/llvm/include/llvm/Passes/PassBuilder.h b/llvm/include/llvm/Passes/PassBuilder.h
index c8f643452bb158..9b4da1c466f57d 100644
--- a/llvm/include/llvm/Passes/PassBuilder.h
+++ b/llvm/include/llvm/Passes/PassBuilder.h
@@ -264,12 +264,12 @@ class PassBuilder {
   /// the LTO run.
   ModulePassManager buildThinLTOPreLinkDefaultPipeline(OptimizationLevel Level);
 
-  /// Build an ThinLTO default optimization pipeline to a pass manager.
+  /// Build a ThinLTO default optimization pipeline to a pass manager.
   ///
   /// This provides a good default optimization pipeline for link-time
   /// optimization and code generation. It is particularly tuned to fit well
   /// when IR coming into the LTO phase was first run through \c
-  /// addPreLinkLTODefaultPipeline, and the two coordinate closely.
+  /// buildThinLTOPreLinkDefaultPipeline, and the two coordinate closely.
   ModulePassManager
   buildThinLTODefaultPipeline(OptimizationLevel Level,
                               const ModuleSummaryIndex *ImportSummary);
@@ -288,7 +288,7 @@ class PassBuilder {
   /// This provides a good default optimization pipeline for link-time
   /// optimization and code generation. It is particularly tuned to fit well
   /// when IR coming into the LTO phase was first run through \c
-  /// addPreLinkLTODefaultPipeline, and the two coordinate closely.
+  /// buildLTOPreLinkDefaultPipeline, and the two coordinate closely.
   ModulePassManager buildLTODefaultPipeline(OptimizationLevel Level,
                                             ModuleSummaryIndex *ExportSummary);
 



More information about the llvm-commits mailing list