[llvm] r278777 - FunctionImport: rename ImportsForModule to ImportList for consistency (NFC)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 06:33:05 PDT 2016


Thanks for the cleanup!
Teresa

On Mon, Aug 15, 2016 at 10:47 PM, Mehdi Amini via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: mehdi_amini
> Date: Tue Aug 16 00:47:12 2016
> New Revision: 278777
>
> URL: http://llvm.org/viewvc/llvm-project?rev=278777&view=rev
> Log:
> FunctionImport: rename ImportsForModule to ImportList for consistency (NFC)
>
> Modified:
>     llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
>
> Modified: llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/
> Transforms/IPO/FunctionImport.cpp?rev=278777&r1=278776&r2=278777&view=diff
> ============================================================
> ==================
> --- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp Tue Aug 16 00:47:12
> 2016
> @@ -270,7 +270,7 @@ static void computeImportForFunction(
>      const FunctionSummary &Summary, const ModuleSummaryIndex &Index,
>      unsigned Threshold, const GVSummaryMapTy &DefinedGVSummaries,
>      SmallVectorImpl<EdgeInfo> &Worklist,
> -    FunctionImporter::ImportMapTy &ImportsForModule,
> +    FunctionImporter::ImportMapTy &ImportList,
>      StringMap<FunctionImporter::ExportSetTy> *ExportLists = nullptr) {
>    for (auto &Edge : Summary.calls()) {
>      auto GUID = Edge.first.getGUID();
> @@ -301,7 +301,7 @@ static void computeImportForFunction(
>             "selectCallee() didn't honor the threshold");
>
>      auto ExportModulePath = ResolvedCalleeSummary->modulePath();
> -    auto &ProcessedThreshold = ImportsForModule[ExportModulePath][GUID];
> +    auto &ProcessedThreshold = ImportList[ExportModulePath][GUID];
>      /// Since the traversal of the call graph is DFS, we can revisit a
> function
>      /// a second time with a higher threshold. In this case, it is added
> back to
>      /// the worklist with the new threshold.
> @@ -339,7 +339,7 @@ static void computeImportForFunction(
>  /// another module (that may require promotion).
>  static void ComputeImportForModule(
>      const GVSummaryMapTy &DefinedGVSummaries, const ModuleSummaryIndex
> &Index,
> -    FunctionImporter::ImportMapTy &ImportsForModule,
> +    FunctionImporter::ImportMapTy &ImportList,
>      StringMap<FunctionImporter::ExportSetTy> *ExportLists = nullptr) {
>    // Worklist contains the list of function imported in this module, for
> which
>    // we will analyse the callees and may import further down the
> callgraph.
> @@ -357,7 +357,7 @@ static void ComputeImportForModule(
>        continue;
>      DEBUG(dbgs() << "Initalize import for " << GVSummary.first << "\n");
>      computeImportForFunction(*FuncSummary, Index, ImportInstrLimit,
> -                             DefinedGVSummaries, Worklist,
> ImportsForModule,
> +                             DefinedGVSummaries, Worklist, ImportList,
>                               ExportLists);
>    }
>
> @@ -371,7 +371,7 @@ static void ComputeImportForModule(
>      Threshold = Threshold * ImportInstrFactor;
>
>      computeImportForFunction(*Summary, Index, Threshold,
> DefinedGVSummaries,
> -                             Worklist, ImportsForModule, ExportLists);
> +                             Worklist, ImportList, ExportLists);
>    }
>  }
>
> @@ -385,10 +385,10 @@ void llvm::ComputeCrossModuleImport(
>      StringMap<FunctionImporter::ExportSetTy> &ExportLists) {
>    // For each module that has function defined, compute the import/export
> lists.
>    for (auto &DefinedGVSummaries : ModuleToDefinedGVSummaries) {
> -    auto &ImportsForModule = ImportLists[DefinedGVSummaries.first()];
> +    auto &ImportList = ImportLists[DefinedGVSummaries.first()];
>      DEBUG(dbgs() << "Computing import for Module '"
>                   << DefinedGVSummaries.first() << "'\n");
> -    ComputeImportForModule(DefinedGVSummaries.second, Index,
> ImportsForModule,
> +    ComputeImportForModule(DefinedGVSummaries.second, Index, ImportList,
>                             &ExportLists);
>    }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>



-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160816/558fcee8/attachment.html>


More information about the llvm-commits mailing list