From 2f09f445b2d6b3ef197aecd8d1e06d08140380f3 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Tue, 21 Dec 2021 10:21:41 -0800 Subject: [PATCH] [BOLT][NFC] Fix file-description comments Summary: Fix comments at the start of source files. (cherry picked from FBD33274597) --- bolt/include/bolt/Core/BinaryBasicBlock.h | 6 ++++-- bolt/include/bolt/Core/BinaryContext.h | 4 ++-- bolt/include/bolt/Core/BinaryData.h | 6 +++++- bolt/include/bolt/Core/BinaryEmitter.h | 7 +++++-- bolt/include/bolt/Core/BinaryFunction.h | 17 ++++++++++++++--- bolt/include/bolt/Core/BinaryLoop.h | 2 +- bolt/include/bolt/Core/BinarySection.h | 6 +++++- bolt/include/bolt/Core/DebugData.h | 5 +++-- bolt/include/bolt/Core/DynoStats.h | 5 ++++- bolt/include/bolt/Core/Exceptions.h | 6 +++++- bolt/include/bolt/Core/JumpTable.h | 5 ++++- bolt/include/bolt/Core/MCPlus.h | 5 ++++- bolt/include/bolt/Core/MCPlusBuilder.h | 5 +++-- bolt/include/bolt/Core/ParallelUtilities.h | 15 ++++++++------- bolt/include/bolt/Core/Relocation.h | 5 ++++- bolt/include/bolt/Passes/ADRRelaxationPass.h | 16 ++++++++-------- bolt/include/bolt/Passes/Aligner.h | 6 +++++- bolt/include/bolt/Passes/AllocCombiner.h | 4 +--- bolt/include/bolt/Passes/AsmDump.h | 2 +- .../bolt/Passes/BinaryFunctionCallGraph.h | 4 +--- bolt/include/bolt/Passes/BinaryPasses.h | 2 +- bolt/include/bolt/Passes/CacheMetrics.h | 4 ++-- bolt/include/bolt/Passes/CallGraph.h | 4 +--- bolt/include/bolt/Passes/CallGraphWalker.h | 4 +--- bolt/include/bolt/Passes/DataflowAnalysis.h | 4 +--- bolt/include/bolt/Passes/DataflowInfoManager.h | 4 +--- bolt/include/bolt/Passes/DominatorAnalysis.h | 4 +--- bolt/include/bolt/Passes/FrameAnalysis.h | 4 +--- bolt/include/bolt/Passes/FrameOptimizer.h | 4 +--- bolt/include/bolt/Passes/HFSort.h | 3 +-- bolt/include/bolt/Passes/IdenticalCodeFolding.h | 4 +--- .../include/bolt/Passes/IndirectCallPromotion.h | 2 +- bolt/include/bolt/Passes/Inliner.h | 2 +- bolt/include/bolt/Passes/Instrumentation.h | 3 ++- .../bolt/Passes/InstrumentationSummary.h | 4 +++- bolt/include/bolt/Passes/JTFootprintReduction.h | 2 +- bolt/include/bolt/Passes/LivenessAnalysis.h | 4 +--- bolt/include/bolt/Passes/LongJmp.h | 4 +--- bolt/include/bolt/Passes/LoopInversionPass.h | 4 +--- bolt/include/bolt/Passes/MCF.h | 4 +--- bolt/include/bolt/Passes/PLTCall.h | 4 +--- bolt/include/bolt/Passes/PatchEntries.h | 2 +- bolt/include/bolt/Passes/ReachingDefOrUse.h | 4 +--- bolt/include/bolt/Passes/ReachingInsns.h | 4 +--- bolt/include/bolt/Passes/RegAnalysis.h | 4 +--- bolt/include/bolt/Passes/RegReAssign.h | 6 ++---- bolt/include/bolt/Passes/ReorderAlgorithm.h | 2 +- bolt/include/bolt/Passes/ReorderData.h | 4 +--- bolt/include/bolt/Passes/ReorderFunctions.h | 4 +--- bolt/include/bolt/Passes/ReorderUtils.h | 5 ++++- bolt/include/bolt/Passes/RetpolineInsertion.h | 4 +--- bolt/include/bolt/Passes/ShrinkWrapping.h | 4 +--- bolt/include/bolt/Passes/SplitFunctions.h | 4 +--- .../bolt/Passes/StackAllocationAnalysis.h | 4 +--- .../bolt/Passes/StackAvailableExpressions.h | 4 +--- bolt/include/bolt/Passes/StackPointerTracking.h | 4 +--- bolt/include/bolt/Passes/StackReachingUses.h | 4 +--- bolt/include/bolt/Passes/StokeInfo.h | 4 +++- bolt/include/bolt/Passes/TailDuplication.h | 16 ++++++++-------- bolt/include/bolt/Passes/ThreeWayBranch.h | 4 +--- .../include/bolt/Passes/ValidateInternalCalls.h | 5 ++--- bolt/include/bolt/Passes/VeneerElimination.h | 4 +--- .../bolt/Profile/BoltAddressTranslation.h | 4 +--- bolt/include/bolt/Profile/DataAggregator.h | 2 +- bolt/include/bolt/Profile/DataReader.h | 2 +- bolt/include/bolt/Profile/Heatmap.h | 4 +--- bolt/include/bolt/Profile/ProfileReaderBase.h | 2 +- bolt/include/bolt/Profile/ProfileYAMLMapping.h | 2 +- bolt/include/bolt/Profile/YAMLProfileReader.h | 4 +--- bolt/include/bolt/Profile/YAMLProfileWriter.h | 5 +---- bolt/include/bolt/Rewrite/BinaryPassManager.h | 2 +- bolt/include/bolt/Rewrite/DWARFRewriter.h | 4 +--- .../bolt/Rewrite/ExecutableFileMemoryManager.h | 4 +--- .../include/bolt/Rewrite/MachORewriteInstance.h | 2 +- bolt/include/bolt/Rewrite/RewriteInstance.h | 2 +- .../bolt/RuntimeLibs/HugifyRuntimeLibrary.h | 6 +++++- .../RuntimeLibs/InstrumentationRuntimeLibrary.h | 7 ++++++- bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h | 7 ++++--- bolt/include/bolt/Utils/CommandLineOpts.h | 3 ++- bolt/include/bolt/Utils/NameResolver.h | 2 +- bolt/include/bolt/Utils/NameShortener.h | 2 +- bolt/include/bolt/Utils/Utils.h | 2 +- bolt/lib/Core/BinaryBasicBlock.cpp | 4 +++- bolt/lib/Core/BinaryContext.cpp | 4 +++- bolt/lib/Core/BinaryData.cpp | 4 +++- bolt/lib/Core/BinaryEmitter.cpp | 5 ++++- bolt/lib/Core/BinaryFunction.cpp | 4 +++- bolt/lib/Core/BinaryFunctionProfile.cpp | 5 ++++- bolt/lib/Core/BinarySection.cpp | 4 +++- bolt/lib/Core/DebugData.cpp | 4 +++- bolt/lib/Core/DynoStats.cpp | 4 +++- bolt/lib/Core/Exceptions.cpp | 4 +++- bolt/lib/Core/JumpTable.cpp | 4 +++- bolt/lib/Core/MCPlusBuilder.cpp | 4 ++-- bolt/lib/Core/ParallelUtilities.cpp | 4 +++- bolt/lib/Core/Relocation.cpp | 4 +++- bolt/lib/Passes/ADRRelaxationPass.cpp | 4 +++- bolt/lib/Passes/Aligner.cpp | 4 +++- bolt/lib/Passes/AllocCombiner.cpp | 4 +++- bolt/lib/Passes/AsmDump.cpp | 4 +++- bolt/lib/Passes/BinaryFunctionCallGraph.cpp | 4 +++- bolt/lib/Passes/BinaryPasses.cpp | 4 +++- bolt/lib/Passes/CacheMetrics.cpp | 5 +++-- bolt/lib/Passes/CallGraph.cpp | 4 +++- bolt/lib/Passes/CallGraphWalker.cpp | 4 +++- bolt/lib/Passes/DataflowAnalysis.cpp | 4 +++- bolt/lib/Passes/DataflowInfoManager.cpp | 4 +++- bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp | 6 +++++- bolt/lib/Passes/FrameAnalysis.cpp | 5 ++++- bolt/lib/Passes/FrameOptimizer.cpp | 4 +++- bolt/lib/Passes/HFSort.cpp | 2 +- bolt/lib/Passes/HFSortPlus.cpp | 6 +++--- bolt/lib/Passes/IdenticalCodeFolding.cpp | 4 +++- bolt/lib/Passes/IndirectCallPromotion.cpp | 4 +++- bolt/lib/Passes/Inliner.cpp | 4 +++- bolt/lib/Passes/Instrumentation.cpp | 4 +++- bolt/lib/Passes/JTFootprintReduction.cpp | 4 +++- bolt/lib/Passes/LivenessAnalysis.cpp | 5 ++--- bolt/lib/Passes/LongJmp.cpp | 4 +++- bolt/lib/Passes/LoopInversionPass.cpp | 4 +++- bolt/lib/Passes/MCF.cpp | 4 +++- bolt/lib/Passes/PLTCall.cpp | 5 +++-- bolt/lib/Passes/PatchEntries.cpp | 5 +++-- bolt/lib/Passes/PettisAndHansen.cpp | 4 +++- bolt/lib/Passes/RegAnalysis.cpp | 4 +++- bolt/lib/Passes/RegReAssign.cpp | 4 +++- bolt/lib/Passes/ReorderAlgorithm.cpp | 5 +++-- bolt/lib/Passes/ReorderData.cpp | 4 +++- bolt/lib/Passes/ReorderFunctions.cpp | 4 +++- bolt/lib/Passes/RetpolineInsertion.cpp | 10 ++++++---- bolt/lib/Passes/ShrinkWrapping.cpp | 4 +++- bolt/lib/Passes/SplitFunctions.cpp | 4 +++- bolt/lib/Passes/StackAllocationAnalysis.cpp | 4 +++- bolt/lib/Passes/StackAvailableExpressions.cpp | 4 +++- bolt/lib/Passes/StackPointerTracking.cpp | 4 +++- bolt/lib/Passes/StackReachingUses.cpp | 5 ++++- bolt/lib/Passes/StokeInfo.cpp | 4 +++- bolt/lib/Passes/TailDuplication.cpp | 5 +++-- bolt/lib/Passes/ThreeWayBranch.cpp | 4 +++- bolt/lib/Passes/ValidateInternalCalls.cpp | 4 +++- bolt/lib/Passes/VeneerElimination.cpp | 3 ++- bolt/lib/Profile/BoltAddressTranslation.cpp | 5 ++--- bolt/lib/Profile/DataAggregator.cpp | 2 +- bolt/lib/Profile/DataReader.cpp | 2 +- bolt/lib/Profile/Heatmap.cpp | 4 +--- bolt/lib/Profile/ProfileReaderBase.cpp | 2 +- bolt/lib/Profile/YAMLProfileReader.cpp | 4 +--- bolt/lib/Profile/YAMLProfileWriter.cpp | 5 +---- bolt/lib/Rewrite/BinaryPassManager.cpp | 4 +--- bolt/lib/Rewrite/BoltDiff.cpp | 2 +- bolt/lib/Rewrite/DWARFRewriter.cpp | 4 +--- .../lib/Rewrite/ExecutableFileMemoryManager.cpp | 4 +--- bolt/lib/Rewrite/MachORewriteInstance.cpp | 4 +--- bolt/lib/Rewrite/RewriteInstance.cpp | 4 +--- bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp | 6 +++++- .../InstrumentationRuntimeLibrary.cpp | 4 +++- bolt/lib/RuntimeLibs/RuntimeLibrary.cpp | 4 +++- .../lib/Target/AArch64/AArch64MCPlusBuilder.cpp | 4 ++-- bolt/lib/Target/X86/X86MCPlusBuilder.cpp | 4 ++-- bolt/lib/Utils/CommandLineOpts.cpp | 2 +- bolt/lib/Utils/Utils.cpp | 2 +- bolt/runtime/common.h | 4 +--- bolt/runtime/hugify.cpp | 2 +- bolt/runtime/instr.cpp | 2 +- bolt/tools/driver/llvm-bolt.cpp | 2 +- bolt/tools/merge-fdata/merge-fdata.cpp | 6 ++++-- 166 files changed, 400 insertions(+), 310 deletions(-) diff --git a/bolt/include/bolt/Core/BinaryBasicBlock.h b/bolt/include/bolt/Core/BinaryBasicBlock.h index eb9eedec8355..fb2eda0de738 100644 --- a/bolt/include/bolt/Core/BinaryBasicBlock.h +++ b/bolt/include/bolt/Core/BinaryBasicBlock.h @@ -1,4 +1,4 @@ -//===--- BinaryBasicBlock.h - Interface for assembly-level basic block ----===// +//===- bolt/Core/BinaryBasicBlock.h - Low-level basic block -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,9 @@ // //===----------------------------------------------------------------------===// // -// Sequence of MC(Plus) instructions. Call/invoke does not terminate the block. +// Sequence of MC/MCPlus instructions. Call/invoke does not terminate the block. +// CFI instructions are part of the instruction list with the initial CFI state +// defined at the beginning of the block. // //===----------------------------------------------------------------------===// diff --git a/bolt/include/bolt/Core/BinaryContext.h b/bolt/include/bolt/Core/BinaryContext.h index 571f9624ecdc..45ce4d6cbe13 100644 --- a/bolt/include/bolt/Core/BinaryContext.h +++ b/bolt/include/bolt/Core/BinaryContext.h @@ -1,4 +1,4 @@ -//===--- BinaryContext.h - Interface for machine-level context -----------===// +//===- bolt/Core/BinaryContext.h - Low-level context ------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// Context for processing binary executables in files and/or memory. +// Context for processing binary executable/library files. // //===----------------------------------------------------------------------===// diff --git a/bolt/include/bolt/Core/BinaryData.h b/bolt/include/bolt/Core/BinaryData.h index 817b1564c7cd..831f968bbfae 100644 --- a/bolt/include/bolt/Core/BinaryData.h +++ b/bolt/include/bolt/Core/BinaryData.h @@ -1,4 +1,4 @@ -//===--- BinaryData.h - Representation of section data objects -----------===// +//===- bolt/Core/BinaryData.h - Objects in a binary file --------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,10 @@ // //===----------------------------------------------------------------------===// // +// This file contains the declaration of the BinaryData class, which represents +// an allocatable entity in a binary file, such as a data object, a jump table, +// or a function. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_BINARY_DATA_H diff --git a/bolt/include/bolt/Core/BinaryEmitter.h b/bolt/include/bolt/Core/BinaryEmitter.h index 39b4a28f7bcc..7406aca8c3ae 100644 --- a/bolt/include/bolt/Core/BinaryEmitter.h +++ b/bolt/include/bolt/Core/BinaryEmitter.h @@ -1,4 +1,4 @@ -//===--- BinaryEmitter.h - collection of functions to emit code and data --===// +//===- bolt/Core/BinaryEmitter.h - Emit code and data -----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// // +// This file contains declarations of functions for emitting code and data into +// a binary file. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_BINARY_EMITTER_H @@ -20,7 +23,7 @@ namespace bolt { class BinaryContext; class BinaryFunction; -/// Emit all code and data in the BinaryContext \p BC. +/// Emit all code and data from the BinaryContext \p BC into the \p Streamer. /// /// \p OrgSecPrefix is used to modify name of emitted original sections /// contained in \p BC. This is done to distinguish them from sections emitted diff --git a/bolt/include/bolt/Core/BinaryFunction.h b/bolt/include/bolt/Core/BinaryFunction.h index 4d08a74427c3..e55a5ff1678e 100644 --- a/bolt/include/bolt/Core/BinaryFunction.h +++ b/bolt/include/bolt/Core/BinaryFunction.h @@ -1,4 +1,4 @@ -//===--- BinaryFunction.h - Interface for machine-level function ----------===// +//===- bolt/Core/BinaryFunction.h - Low-level function ----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,8 +6,19 @@ // //===----------------------------------------------------------------------===// // -// Interface to function in binary (machine) form. This is assembly-level -// code representation with the control flow. +// This file contains the declaration of the BinaryFunction class. It represents +// a function at the lowest IR level. Typically, a BinaryFunction represents a +// function object in a compiled and linked binary file. However, a +// BinaryFunction can also be constructed manually, e.g. for injecting into a +// binary file. +// +// A BinaryFunction could be in one of the several states described in +// BinaryFunction::State. While in the disassembled state, it will contain a +// list of instructions with their offsets. In the CFG state, it will contain a +// list of BinaryBasicBlocks that form a control-flow graph. This state is best +// suited for binary analysis and optimizations. However, sometimes it's +// impossible to build the precise CFG due to the ambiguity of indirect +// branches. // //===----------------------------------------------------------------------===// diff --git a/bolt/include/bolt/Core/BinaryLoop.h b/bolt/include/bolt/Core/BinaryLoop.h index ae810dfd6ef7..8c63d6dec5f2 100644 --- a/bolt/include/bolt/Core/BinaryLoop.h +++ b/bolt/include/bolt/Core/BinaryLoop.h @@ -1,4 +1,4 @@ -//===--- BinaryLoop.h - Interface for machine-level loop ------------------===// +//===- bolt/Core/BinaryLoop.h - Loop info at low-level IR -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Core/BinarySection.h b/bolt/include/bolt/Core/BinarySection.h index 4914f871bdf4..bef74cc619e6 100644 --- a/bolt/include/bolt/Core/BinarySection.h +++ b/bolt/include/bolt/Core/BinarySection.h @@ -1,4 +1,4 @@ -//===--- BinarySection.h - Interface for object file section --------------===// +//===- bolt/Core/BinarySection.h - Section in a binary file -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,10 @@ // //===----------------------------------------------------------------------===// // +// This file contains the declaration of the BinarySection class, which +// represents a section in an executable file and contains its properties, +// flags, contents, and relocations. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_BINARY_SECTION_H diff --git a/bolt/include/bolt/Core/DebugData.h b/bolt/include/bolt/Core/DebugData.h index e802491befa7..3a5d13bcaa23 100644 --- a/bolt/include/bolt/Core/DebugData.h +++ b/bolt/include/bolt/Core/DebugData.h @@ -1,4 +1,4 @@ -//===-- DebugData.h - Representation and writing of debugging information. -==// +//===- bolt/Core/DebugData.h - Debugging information handling ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// // -// Classes that represent and serialize DWARF-related entities. +// This file contains declaration of classes that represent and serialize +// DWARF-related entities. // //===----------------------------------------------------------------------===// diff --git a/bolt/include/bolt/Core/DynoStats.h b/bolt/include/bolt/Core/DynoStats.h index c531eeefc464..19e5a063b90e 100644 --- a/bolt/include/bolt/Core/DynoStats.h +++ b/bolt/include/bolt/Core/DynoStats.h @@ -1,4 +1,4 @@ -//===--- DynoStats.h ------------------------------------------------------===// +//===- bolt/Core/DynoStats.h - Dynamic execution stats ----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// // +// Keep track of statistics about the trace of execution captured in BOLT +// profile. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_DYNO_STATS_H diff --git a/bolt/include/bolt/Core/Exceptions.h b/bolt/include/bolt/Core/Exceptions.h index c4b4819d9d91..18dfa08097be 100644 --- a/bolt/include/bolt/Core/Exceptions.h +++ b/bolt/include/bolt/Core/Exceptions.h @@ -1,4 +1,4 @@ -//===-- Exceptions.h - Helpers for processing C++ exceptions --------------===// +//===- bolt/Core/Exceptions.h - Helpers for C++ exceptions ------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file contains declarations of classes for handling C++ exception info. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_EXCEPTIONS_H @@ -19,7 +21,9 @@ #include namespace llvm { + class DWARFDebugFrame; + namespace dwarf { class FDE; } // namespace dwarf diff --git a/bolt/include/bolt/Core/JumpTable.h b/bolt/include/bolt/Core/JumpTable.h index f47e7c15d049..e5f031e6794d 100644 --- a/bolt/include/bolt/Core/JumpTable.h +++ b/bolt/include/bolt/Core/JumpTable.h @@ -1,4 +1,4 @@ -//===--- JumpTable.h - Representation of a jump table ---------------------===// +//===- bolt/Core/JumpTable.h - Jump table at low-level IR -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// // +// This file defines the JumpTable class, which represents a jump table in a +// binary file. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_JUMP_TABLE_H diff --git a/bolt/include/bolt/Core/MCPlus.h b/bolt/include/bolt/Core/MCPlus.h index b82061c0c89e..67430bba221c 100644 --- a/bolt/include/bolt/Core/MCPlus.h +++ b/bolt/include/bolt/Core/MCPlus.h @@ -1,4 +1,4 @@ -//===--- MCPlus.h - helpers for MCPlus-level instructions -----------------===// +//===- bolt/Core/MCPlus.h - Helpers for MCPlus instructions -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// // +// This file contains declarations for helper functions for adding annotations +// to MCInst objects. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_MCPLUS_H diff --git a/bolt/include/bolt/Core/MCPlusBuilder.h b/bolt/include/bolt/Core/MCPlusBuilder.h index 1b4ff50bb739..11182b706989 100644 --- a/bolt/include/bolt/Core/MCPlusBuilder.h +++ b/bolt/include/bolt/Core/MCPlusBuilder.h @@ -1,4 +1,4 @@ -//===--- MCPlusBuilder.h - main interface for MCPlus-level instructions ---===// +//===- bolt/Core/MCPlusBuilder.h - Interface for MCPlus ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// // -// Create/analyze/modify instructions at MC+ level. +// This file contains the declaration of MCPlusBuilder class, which provides +// means to create/analyze/modify instructions at MCPlus level. // //===----------------------------------------------------------------------===// diff --git a/bolt/include/bolt/Core/ParallelUtilities.h b/bolt/include/bolt/Core/ParallelUtilities.h index d3358521c90f..7d3af47757bc 100644 --- a/bolt/include/bolt/Core/ParallelUtilities.h +++ b/bolt/include/bolt/Core/ParallelUtilities.h @@ -1,15 +1,16 @@ -//===-- ParallelUtilities.h - -----------------------------------*- C++ -*-===// +//===- bolt/Core/ParallelUtilities.h - Parallel utilities -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// This class creates an interface that can be used to run parallel tasks that -// operate on functions. Several scheduling criteria are supported using -// SchedulingPolicy, and are defined by how the runtime cost should be -// estimated. -// If the NoThreads flags is passed, work will execute sequentially. +// +// This file contains functions for assisting parallel processing of binary +// functions. Several scheduling criteria are supported using SchedulingPolicy, +// and are defined by how the runtime cost should be estimated. If the NoThreads +// flags is passed, all jobs will execute sequentially. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_PARALLEL_UTILITIES_H @@ -49,7 +50,7 @@ enum SchedulingPolicy { SP_BB_QUADRATIC, /// cost is estimated by the square of the BB count }; -/// Return the managed threadpool and initialize it if not intiliazed +/// Return the managed thread pool and initialize it if not initiliazed. ThreadPool &getThreadPool(); /// Perform the work on each BinaryFunction except those that are accepted diff --git a/bolt/include/bolt/Core/Relocation.h b/bolt/include/bolt/Core/Relocation.h index e35f236b166f..9e13234494ff 100644 --- a/bolt/include/bolt/Core/Relocation.h +++ b/bolt/include/bolt/Core/Relocation.h @@ -1,4 +1,4 @@ -//===--- Relocation.h - Interface for object file relocations ------------===// +//===- bolt/Core/Relocation.h - Object file relocations ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// // +// This file contains the declaration of Relocation class, which represents a +// relocation in an object or a binary file. +// //===----------------------------------------------------------------------===// #ifndef BOLT_CORE_RELOCATION_H diff --git a/bolt/include/bolt/Passes/ADRRelaxationPass.h b/bolt/include/bolt/Passes/ADRRelaxationPass.h index c5294bbb20b8..03f5014e8895 100644 --- a/bolt/include/bolt/Passes/ADRRelaxationPass.h +++ b/bolt/include/bolt/Passes/ADRRelaxationPass.h @@ -1,4 +1,4 @@ -//===--------- Passes/ADRRelaxationPass.h ---------------------------------===// +//===- bolt/Passes/ADRRelaxationPass.h --------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,6 +7,13 @@ // //===----------------------------------------------------------------------===// // +// This file declares the ADRRelaxationPass class, which replaces AArch64 +// non-local ADR instructions with ADRP + ADD due to small offset range of ADR +// instruction (+- 1MB) which could be easily overflowed after BOLT +// optimizations. Such problems are usually connected with errata 843419 +// https://developer.arm.com/documentation/epm048406/2100/ +// The linker could replace ADRP instruction with ADR in some cases. +// //===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_ADRRELAXATIONPASS_H @@ -14,13 +21,6 @@ #include "bolt/Passes/BinaryPasses.h" -// This pass replaces AArch64 non-local ADR instructions -// with ADRP + ADD due to small offset range of ADR instruction -// (+- 1MB) which could be easely overflowed after BOLT optimizations -// Such problems are usually connected with errata 843419 -// https://developer.arm.com/documentation/epm048406/2100/ -// The linker could replace ADRP instruction with ADR in some cases. - namespace llvm { namespace bolt { diff --git a/bolt/include/bolt/Passes/Aligner.h b/bolt/include/bolt/Passes/Aligner.h index 5a87a6a06d5a..58cc9dc7d4a3 100644 --- a/bolt/include/bolt/Passes/Aligner.h +++ b/bolt/include/bolt/Passes/Aligner.h @@ -1,4 +1,4 @@ -//===--------- Passes/Aligner.h -------------------------------------------===// +//===- bolt/Passes/Aligner.h - Pass for optimal code alignment --*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,10 @@ // //===----------------------------------------------------------------------===// // +// This file contains the declaration of the Aligner class, which provides +// alignment for code, e.g. basic block and functions, with the goal to achieve +// the optimal performance. +// //===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_ALIGNER_H diff --git a/bolt/include/bolt/Passes/AllocCombiner.h b/bolt/include/bolt/Passes/AllocCombiner.h index f291dc72669e..810c26571419 100644 --- a/bolt/include/bolt/Passes/AllocCombiner.h +++ b/bolt/include/bolt/Passes/AllocCombiner.h @@ -1,12 +1,10 @@ -//===--- Passes/AllocCombiner.h -------------------------------------------===// +//===- bolt/Passes/AllocCombiner.h ------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_FRAMEDEFRAG_H #define BOLT_PASSES_FRAMEDEFRAG_H diff --git a/bolt/include/bolt/Passes/AsmDump.h b/bolt/include/bolt/Passes/AsmDump.h index 0f9d164e24c2..7cc96f20a920 100644 --- a/bolt/include/bolt/Passes/AsmDump.h +++ b/bolt/include/bolt/Passes/AsmDump.h @@ -1,4 +1,4 @@ -//===--- AsmDump.h - Dumping of a BinaryFunction into assembly ----------===// +//===- bolt/Passes/AsmDump.h - Dump BinaryFunction as assembly --*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Passes/BinaryFunctionCallGraph.h b/bolt/include/bolt/Passes/BinaryFunctionCallGraph.h index 76243c20fe39..5ce3abe617c7 100644 --- a/bolt/include/bolt/Passes/BinaryFunctionCallGraph.h +++ b/bolt/include/bolt/Passes/BinaryFunctionCallGraph.h @@ -1,12 +1,10 @@ -//===--- Passes/CallGraph.h -----------------------------------------------===// +//===- bolt/Passes/CallGraph.h ----------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_BINARY_FUNCTION_CALLGRAPH_H #define BOLT_PASSES_BINARY_FUNCTION_CALLGRAPH_H diff --git a/bolt/include/bolt/Passes/BinaryPasses.h b/bolt/include/bolt/Passes/BinaryPasses.h index 9af899eaa26e..eac6eb819ca1 100644 --- a/bolt/include/bolt/Passes/BinaryPasses.h +++ b/bolt/include/bolt/Passes/BinaryPasses.h @@ -1,4 +1,4 @@ -//===--- BinaryPasses.h - Binary-level analysis/optimization passes -------===// +//===- bolt/Passes/BinaryPasses.h - Binary-level passes ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Passes/CacheMetrics.h b/bolt/include/bolt/Passes/CacheMetrics.h index 59a0d1bfc6e3..8050f6c2f7a4 100644 --- a/bolt/include/bolt/Passes/CacheMetrics.h +++ b/bolt/include/bolt/Passes/CacheMetrics.h @@ -1,4 +1,4 @@ -//===- CacheMetrics.h - Interface for instruction cache evaluation --===// +//===- bolt/Passes/CacheMetrics.h - Instruction cache metrics ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// Functions to show metrics of cache lines +// Functions to show metrics of cache lines. // //===----------------------------------------------------------------------===// diff --git a/bolt/include/bolt/Passes/CallGraph.h b/bolt/include/bolt/Passes/CallGraph.h index 5d7eb88dce54..72067791cc3e 100644 --- a/bolt/include/bolt/Passes/CallGraph.h +++ b/bolt/include/bolt/Passes/CallGraph.h @@ -1,12 +1,10 @@ -//===--- Passes/CallGraph.h -----------------------------------------------===// +//===- bolt/Passes/CallGraph.h ----------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_CALLGRAPH_H #define BOLT_PASSES_CALLGRAPH_H diff --git a/bolt/include/bolt/Passes/CallGraphWalker.h b/bolt/include/bolt/Passes/CallGraphWalker.h index bca9b6d7fdb4..ac45644be362 100644 --- a/bolt/include/bolt/Passes/CallGraphWalker.h +++ b/bolt/include/bolt/Passes/CallGraphWalker.h @@ -1,12 +1,10 @@ -//===--- Passes/CallGraphWalker.h -----------------------------------------===// +//===- bolt/Passes/CallGraphWalker.h ----------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_CALLGRAPHWALKER_H #define BOLT_PASSES_CALLGRAPHWALKER_H diff --git a/bolt/include/bolt/Passes/DataflowAnalysis.h b/bolt/include/bolt/Passes/DataflowAnalysis.h index 80880cb677b3..37d15996b78b 100644 --- a/bolt/include/bolt/Passes/DataflowAnalysis.h +++ b/bolt/include/bolt/Passes/DataflowAnalysis.h @@ -1,12 +1,10 @@ -//===--- Passes/DataflowAnalysis.h ----------------------------------------===// +//===- bolt/Passes/DataflowAnalysis.h ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_DATAFLOWANALYSIS_H #define BOLT_PASSES_DATAFLOWANALYSIS_H diff --git a/bolt/include/bolt/Passes/DataflowInfoManager.h b/bolt/include/bolt/Passes/DataflowInfoManager.h index ebc2bd012a20..cb0d8162d14b 100644 --- a/bolt/include/bolt/Passes/DataflowInfoManager.h +++ b/bolt/include/bolt/Passes/DataflowInfoManager.h @@ -1,12 +1,10 @@ -//===--- Passes/DataflowInfoManager.h -------------------------------------===// +//===- bolt/Passes/DataflowInfoManager.h ------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_DATAFLOWINFOMANAGER_H #define BOLT_PASSES_DATAFLOWINFOMANAGER_H diff --git a/bolt/include/bolt/Passes/DominatorAnalysis.h b/bolt/include/bolt/Passes/DominatorAnalysis.h index 96fc5ade8708..e27c3430fd21 100644 --- a/bolt/include/bolt/Passes/DominatorAnalysis.h +++ b/bolt/include/bolt/Passes/DominatorAnalysis.h @@ -1,12 +1,10 @@ -//===--- Passes/DominatorAnalysis.h ---------------------------------------===// +//===- bolt/Passes/DominatorAnalysis.h --------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_DOMINATORANALYSIS_H #define BOLT_PASSES_DOMINATORANALYSIS_H diff --git a/bolt/include/bolt/Passes/FrameAnalysis.h b/bolt/include/bolt/Passes/FrameAnalysis.h index 56755b8d3572..ec446948095a 100644 --- a/bolt/include/bolt/Passes/FrameAnalysis.h +++ b/bolt/include/bolt/Passes/FrameAnalysis.h @@ -1,12 +1,10 @@ -//===--- Passes/FrameAnalysis.h -------------------------------------------===// +//===- bolt/Passes/FrameAnalysis.h ------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_FRAMEANALYSIS_H #define BOLT_PASSES_FRAMEANALYSIS_H diff --git a/bolt/include/bolt/Passes/FrameOptimizer.h b/bolt/include/bolt/Passes/FrameOptimizer.h index 3c641e88bec2..8cce91d9707a 100644 --- a/bolt/include/bolt/Passes/FrameOptimizer.h +++ b/bolt/include/bolt/Passes/FrameOptimizer.h @@ -1,12 +1,10 @@ -//===--- Passes/FrameOptimizer.h ------------------------------------------===// +//===- bolt/Passes/FrameOptimizer.h -----------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_FRAMEOPTIMIZER_H #define BOLT_PASSES_FRAMEOPTIMIZER_H diff --git a/bolt/include/bolt/Passes/HFSort.h b/bolt/include/bolt/Passes/HFSort.h index ef0dd1e2195e..884c4692ddeb 100644 --- a/bolt/include/bolt/Passes/HFSort.h +++ b/bolt/include/bolt/Passes/HFSort.h @@ -1,4 +1,4 @@ -//===--- HFSort.h - Cluster functions by hotness --------------------------===// +//===- bolt/Passes/HFSort.h - Cluster functions by hotness ------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -15,7 +15,6 @@ // 3. pettisAndHansen // 4. randomClusters // -// See original code in hphp/utils/hfsort.[h,cpp] //===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_HFSORT_H diff --git a/bolt/include/bolt/Passes/IdenticalCodeFolding.h b/bolt/include/bolt/Passes/IdenticalCodeFolding.h index ff4da3bd4fc7..c15cebc8af19 100644 --- a/bolt/include/bolt/Passes/IdenticalCodeFolding.h +++ b/bolt/include/bolt/Passes/IdenticalCodeFolding.h @@ -1,12 +1,10 @@ -//===--- IdenticalCodeFolding.h -------------------------------------------===// +//===- bolt/Passes/IdenticalCodeFolding.h -----------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_IDENTICAL_CODE_FOLDING_H #define BOLT_PASSES_IDENTICAL_CODE_FOLDING_H diff --git a/bolt/include/bolt/Passes/IndirectCallPromotion.h b/bolt/include/bolt/Passes/IndirectCallPromotion.h index ffa4fbcc25f8..9c1a41c1e609 100644 --- a/bolt/include/bolt/Passes/IndirectCallPromotion.h +++ b/bolt/include/bolt/Passes/IndirectCallPromotion.h @@ -1,4 +1,4 @@ -//===--- BinaryPasses.h - Binary-level analysis/optimization passes -------===// +//===- bolt/Passes/IndirectCallPromotion.h ----------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Passes/Inliner.h b/bolt/include/bolt/Passes/Inliner.h index 7d4e78fd1c82..c6a9b891e68a 100644 --- a/bolt/include/bolt/Passes/Inliner.h +++ b/bolt/include/bolt/Passes/Inliner.h @@ -1,4 +1,4 @@ -//===--- Passes/Inliner.h - Inlining infra for BOLT -----------------------===// +//===- bolt/Passes/Inliner.h - Inlining infra for BOLT ----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Passes/Instrumentation.h b/bolt/include/bolt/Passes/Instrumentation.h index ef057516b8dc..ac16329da8ad 100644 --- a/bolt/include/bolt/Passes/Instrumentation.h +++ b/bolt/include/bolt/Passes/Instrumentation.h @@ -1,4 +1,4 @@ -//===--- Passes/Instrumentation.h -----------------------------------------===// +//===- bolt/Passes/Instrumentation.h ----------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -13,6 +13,7 @@ // runtime/instr.cpp // //===----------------------------------------------------------------------===// + #ifndef BOLT_PASSES_INSTRUMENTATION_H #define BOLT_PASSES_INSTRUMENTATION_H diff --git a/bolt/include/bolt/Passes/InstrumentationSummary.h b/bolt/include/bolt/Passes/InstrumentationSummary.h index f73a883f83ab..6a074b590857 100644 --- a/bolt/include/bolt/Passes/InstrumentationSummary.h +++ b/bolt/include/bolt/Passes/InstrumentationSummary.h @@ -1,13 +1,15 @@ -//===--- InstrumentationSummary.h -------------------------------------===// +//===- bolt/Passes/InstrumentationSummary.h ---------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// // InstrumentationSummary holds all the data generated during // the Instrumentation pass, which will be needed latter for runtime library // binary emit and linking. +// //===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_INSTRUMENTATION_SUMMARY_H diff --git a/bolt/include/bolt/Passes/JTFootprintReduction.h b/bolt/include/bolt/Passes/JTFootprintReduction.h index dbe8770e5ea9..084049d3b463 100644 --- a/bolt/include/bolt/Passes/JTFootprintReduction.h +++ b/bolt/include/bolt/Passes/JTFootprintReduction.h @@ -1,4 +1,4 @@ -//===--- JTFootprintReduction.h -------------------------------------------===// +//===- bolt/Passes/JTFootprintReduction.h -----------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Passes/LivenessAnalysis.h b/bolt/include/bolt/Passes/LivenessAnalysis.h index 7a60fe9c86f1..be47ffee136c 100644 --- a/bolt/include/bolt/Passes/LivenessAnalysis.h +++ b/bolt/include/bolt/Passes/LivenessAnalysis.h @@ -1,12 +1,10 @@ -//===--- Passes/LivenessAnalysis.h ----------------------------------------===// +//===- bolt/Passes/LivenessAnalysis.h ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_LIVENESSANALYSIS_H #define BOLT_PASSES_LIVENESSANALYSIS_H diff --git a/bolt/include/bolt/Passes/LongJmp.h b/bolt/include/bolt/Passes/LongJmp.h index 51fe7fabca2d..c95181922dbc 100644 --- a/bolt/include/bolt/Passes/LongJmp.h +++ b/bolt/include/bolt/Passes/LongJmp.h @@ -1,12 +1,10 @@ -//===--- Passes/LongJmp.h -------------------------------------------------===// +//===- bolt/Passes/LongJmp.h ------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_LONGJMP_H #define BOLT_PASSES_LONGJMP_H diff --git a/bolt/include/bolt/Passes/LoopInversionPass.h b/bolt/include/bolt/Passes/LoopInversionPass.h index 10a10f8efeb0..472fb36640c1 100644 --- a/bolt/include/bolt/Passes/LoopInversionPass.h +++ b/bolt/include/bolt/Passes/LoopInversionPass.h @@ -1,12 +1,10 @@ -//===--------- Passes/LoopInversionPass.h ---------------------------------===// +//===- bolt/Passes/LoopInversionPass.h --------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_LOOPINVERSION_H #define BOLT_PASSES_LOOPINVERSION_H diff --git a/bolt/include/bolt/Passes/MCF.h b/bolt/include/bolt/Passes/MCF.h index ee5b8f6b82d1..95ca64870356 100644 --- a/bolt/include/bolt/Passes/MCF.h +++ b/bolt/include/bolt/Passes/MCF.h @@ -1,12 +1,10 @@ -//===--- Passes/MCF.h -----------------------------------------------------===// +//===- bolt/Passes/MCF.h ----------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_MCF_H #define BOLT_PASSES_MCF_H diff --git a/bolt/include/bolt/Passes/PLTCall.h b/bolt/include/bolt/Passes/PLTCall.h index 4a0e0d695976..4fdbf60c7f9f 100644 --- a/bolt/include/bolt/Passes/PLTCall.h +++ b/bolt/include/bolt/Passes/PLTCall.h @@ -1,12 +1,10 @@ -//===--- Passes/PLTCall.h - PLT call optimization -------------------------===// +//===- bolt/Passes/PLTCall.h - PLT call optimization ------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_PLTCALL_H #define BOLT_PASSES_PLTCALL_H diff --git a/bolt/include/bolt/Passes/PatchEntries.h b/bolt/include/bolt/Passes/PatchEntries.h index f3f06c3a2957..b9ed4a5e4280 100644 --- a/bolt/include/bolt/Passes/PatchEntries.h +++ b/bolt/include/bolt/Passes/PatchEntries.h @@ -1,4 +1,4 @@ -//===--- PatchEntries.h - pass for patching function entries --------------===// +//===- bolt/Passes/PatchEntries.h - Patch function entries ------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Passes/ReachingDefOrUse.h b/bolt/include/bolt/Passes/ReachingDefOrUse.h index a98210e0f14f..6db378e79e0d 100644 --- a/bolt/include/bolt/Passes/ReachingDefOrUse.h +++ b/bolt/include/bolt/Passes/ReachingDefOrUse.h @@ -1,12 +1,10 @@ -//===--- Passes/ReachingDefOrUse.h ----------------------------------------===// +//===- bolt/Passes/ReachingDefOrUse.h ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_REACHINGDEFORUSE_H #define BOLT_PASSES_REACHINGDEFORUSE_H diff --git a/bolt/include/bolt/Passes/ReachingInsns.h b/bolt/include/bolt/Passes/ReachingInsns.h index 666d219cfbaf..a855b7a5d0e8 100644 --- a/bolt/include/bolt/Passes/ReachingInsns.h +++ b/bolt/include/bolt/Passes/ReachingInsns.h @@ -1,12 +1,10 @@ -//===--- Passes/ReachingInsns.h -------------------------------------------===// +//===- bolt/Passes/ReachingInsns.h ------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_REACHINGINSNS_H #define BOLT_PASSES_REACHINGINSNS_H diff --git a/bolt/include/bolt/Passes/RegAnalysis.h b/bolt/include/bolt/Passes/RegAnalysis.h index c424c827b77f..da814cbeed7b 100644 --- a/bolt/include/bolt/Passes/RegAnalysis.h +++ b/bolt/include/bolt/Passes/RegAnalysis.h @@ -1,12 +1,10 @@ -//===--- Passes/RegAnalysis.h ---------------------------------------------===// +//===- bolt/Passes/RegAnalysis.h --------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_REGANALYSIS_H #define BOLT_PASSES_REGANALYSIS_H diff --git a/bolt/include/bolt/Passes/RegReAssign.h b/bolt/include/bolt/Passes/RegReAssign.h index 6fd73a8bf074..df015200855e 100644 --- a/bolt/include/bolt/Passes/RegReAssign.h +++ b/bolt/include/bolt/Passes/RegReAssign.h @@ -1,13 +1,11 @@ -//===--- Passes/RegReAssign.h -//----------------------------------------------===// +//===- bolt/Passes/RegReAssign.h --------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// + #ifndef BOLT_PASSES_REGREASSIGN_H #define BOLT_PASSES_REGREASSIGN_H diff --git a/bolt/include/bolt/Passes/ReorderAlgorithm.h b/bolt/include/bolt/Passes/ReorderAlgorithm.h index c718188b5ef9..d94062215705 100644 --- a/bolt/include/bolt/Passes/ReorderAlgorithm.h +++ b/bolt/include/bolt/Passes/ReorderAlgorithm.h @@ -1,4 +1,4 @@ -// Passes/ReorderAlgorithm.h - Interface for basic block reorderng algorithms // +//===- bolt/Passes/ReorderAlgorithm.h - Basic block reorderng ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Passes/ReorderData.h b/bolt/include/bolt/Passes/ReorderData.h index c5bb875739ee..65b730652101 100644 --- a/bolt/include/bolt/Passes/ReorderData.h +++ b/bolt/include/bolt/Passes/ReorderData.h @@ -1,12 +1,10 @@ -//===--- ReorderSection.h - Profile based reordering of section data =========// +//===- bolt/Passes/ReorderSection.h - Reorder section data ------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_REORDER_DATA_H #define BOLT_PASSES_REORDER_DATA_H diff --git a/bolt/include/bolt/Passes/ReorderFunctions.h b/bolt/include/bolt/Passes/ReorderFunctions.h index bf3019568904..f629521df59d 100644 --- a/bolt/include/bolt/Passes/ReorderFunctions.h +++ b/bolt/include/bolt/Passes/ReorderFunctions.h @@ -1,12 +1,10 @@ -//===--- ReorderFunctions.h - Function reordering pass --------------------===// +//===- bolt/Passes/ReorderFunctions.h - Reorder functions -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_REORDER_FUNCTIONS_H #define BOLT_PASSES_REORDER_FUNCTIONS_H diff --git a/bolt/include/bolt/Passes/ReorderUtils.h b/bolt/include/bolt/Passes/ReorderUtils.h index cc3cea37a187..310b84f0abab 100644 --- a/bolt/include/bolt/Passes/ReorderUtils.h +++ b/bolt/include/bolt/Passes/ReorderUtils.h @@ -1,4 +1,4 @@ -// Passes/ReorderUtils.h - Helper methods for function and block reordering // +//===- bolt/Passes/ReorderUtils.h -------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// // +// This file contains classes and functions to assist function and basic block +// reordering. +// //===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_REORDER_UTILS_H diff --git a/bolt/include/bolt/Passes/RetpolineInsertion.h b/bolt/include/bolt/Passes/RetpolineInsertion.h index ea72377a2932..5cfa5dd5f569 100644 --- a/bolt/include/bolt/Passes/RetpolineInsertion.h +++ b/bolt/include/bolt/Passes/RetpolineInsertion.h @@ -1,12 +1,10 @@ -//===--- Passes/RetpolineInsertion.h --------------------------------------===// +//===- bolt/Passes/RetpolineInsertion.h -------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_RETPOLINE_INSERTION_H #define BOLT_PASSES_RETPOLINE_INSERTION_H diff --git a/bolt/include/bolt/Passes/ShrinkWrapping.h b/bolt/include/bolt/Passes/ShrinkWrapping.h index 4e8a3107c874..b9afc282071e 100644 --- a/bolt/include/bolt/Passes/ShrinkWrapping.h +++ b/bolt/include/bolt/Passes/ShrinkWrapping.h @@ -1,12 +1,10 @@ -//===--- Passes/ShrinkWrapping.h ------------------------------------------===// +//===- bolt/Passes/ShrinkWrapping.h -----------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_SHRINKWRAPPING_H #define BOLT_PASSES_SHRINKWRAPPING_H diff --git a/bolt/include/bolt/Passes/SplitFunctions.h b/bolt/include/bolt/Passes/SplitFunctions.h index 1f7c0cd6e702..7c8a5eafc280 100644 --- a/bolt/include/bolt/Passes/SplitFunctions.h +++ b/bolt/include/bolt/Passes/SplitFunctions.h @@ -1,12 +1,10 @@ -//===--- SplitFunctions.h - pass for splitting function code --------------===// +//===- bolt/Passes/SplitFunctions.h - Split function code -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_SPLIT_FUNCTIONS_H #define BOLT_PASSES_SPLIT_FUNCTIONS_H diff --git a/bolt/include/bolt/Passes/StackAllocationAnalysis.h b/bolt/include/bolt/Passes/StackAllocationAnalysis.h index 8a88efca4519..fa3c6b7b5cde 100644 --- a/bolt/include/bolt/Passes/StackAllocationAnalysis.h +++ b/bolt/include/bolt/Passes/StackAllocationAnalysis.h @@ -1,12 +1,10 @@ -//===--- Passes/StackAllocationAnalysis.h ---------------------------------===// +//===- bolt/Passes/StackAllocationAnalysis.h --------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_STACKALLOCATIONANALYSIS_H #define BOLT_PASSES_STACKALLOCATIONANALYSIS_H diff --git a/bolt/include/bolt/Passes/StackAvailableExpressions.h b/bolt/include/bolt/Passes/StackAvailableExpressions.h index ebff31129234..a85c16aa73ff 100644 --- a/bolt/include/bolt/Passes/StackAvailableExpressions.h +++ b/bolt/include/bolt/Passes/StackAvailableExpressions.h @@ -1,12 +1,10 @@ -//===--- Passes/StackAvailableExpressions.h -------------------------------===// +//===- bolt/Passes/StackAvailableExpressions.h ------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_STACKAVAILABLEEXPRESSIONS_H #define BOLT_PASSES_STACKAVAILABLEEXPRESSIONS_H diff --git a/bolt/include/bolt/Passes/StackPointerTracking.h b/bolt/include/bolt/Passes/StackPointerTracking.h index 3d0075906559..703bba8ff74d 100644 --- a/bolt/include/bolt/Passes/StackPointerTracking.h +++ b/bolt/include/bolt/Passes/StackPointerTracking.h @@ -1,12 +1,10 @@ -//===--- Passes/StackPointerTracking.h ------------------------------------===// +//===- bolt/Passes/StackPointerTracking.h -----------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_STACKPOINTERTRACKING_H #define BOLT_PASSES_STACKPOINTERTRACKING_H diff --git a/bolt/include/bolt/Passes/StackReachingUses.h b/bolt/include/bolt/Passes/StackReachingUses.h index 7977dd7c4235..ff2c849f4724 100644 --- a/bolt/include/bolt/Passes/StackReachingUses.h +++ b/bolt/include/bolt/Passes/StackReachingUses.h @@ -1,12 +1,10 @@ -//===--- Passes/StackReachingUses.h ---------------------------------------===// +//===- bolt/Passes/StackReachingUses.h --------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_STACKREACHINGUSES_H #define BOLT_PASSES_STACKREACHINGUSES_H diff --git a/bolt/include/bolt/Passes/StokeInfo.h b/bolt/include/bolt/Passes/StokeInfo.h index bebc4ac1e274..04842762955b 100644 --- a/bolt/include/bolt/Passes/StokeInfo.h +++ b/bolt/include/bolt/Passes/StokeInfo.h @@ -1,10 +1,11 @@ -//===--- Passes/StokeInfo.h -------------------------------------------===// +//===- bolt/Passes/StokeInfo.h ----------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// // Pass to get information for functions for the Stoke Optimization // To use the Stoke optimization technique to optimize the HHVM. // This Pass solves the two major problems to use the Stoke program without @@ -20,6 +21,7 @@ // .csv file. Next, we use python scripts to process the file, filter // out functions for optimization and automatically generate configure files. // Finally, these configure files are feed to the Stoke to do the job. +// //===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_STOKEINFO_H diff --git a/bolt/include/bolt/Passes/TailDuplication.h b/bolt/include/bolt/Passes/TailDuplication.h index a3e4f5604362..2a5d4f8531f5 100644 --- a/bolt/include/bolt/Passes/TailDuplication.h +++ b/bolt/include/bolt/Passes/TailDuplication.h @@ -1,4 +1,4 @@ -//===--------- Passes/TailDuplication.h ---------------------------------===// +//===- bolt/Passes/TailDuplication.h ----------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,13 +6,6 @@ // //===----------------------------------------------------------------------===// // -//===----------------------------------------------------------------------===// - -#ifndef BOLT_PASSES_TAILDUPLICATION_H -#define BOLT_PASSES_TAILDUPLICATION_H - -#include "bolt/Passes/BinaryPasses.h" - // This pass founds cases when BBs have layout: // #BB0: // @@ -39,6 +32,13 @@ // that if there is too much code duplication, we may end up evicting hot cache // lines and causing the opposite effect, hurting i-cache performance This needs // to be well balanced to achieve the optimal effect +// +//===----------------------------------------------------------------------===// + +#ifndef BOLT_PASSES_TAILDUPLICATION_H +#define BOLT_PASSES_TAILDUPLICATION_H + +#include "bolt/Passes/BinaryPasses.h" namespace llvm { namespace bolt { diff --git a/bolt/include/bolt/Passes/ThreeWayBranch.h b/bolt/include/bolt/Passes/ThreeWayBranch.h index c501725fae33..3eabf1b27e9d 100644 --- a/bolt/include/bolt/Passes/ThreeWayBranch.h +++ b/bolt/include/bolt/Passes/ThreeWayBranch.h @@ -1,12 +1,10 @@ -//===--------- Passes/ThreeWayBranch.h ------------------------------------===// +//===- bolt/Passes/ThreeWayBranch.h -----------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_THREEWAYBRANCH_H #define BOLT_PASSES_THREEWAYBRANCH_H diff --git a/bolt/include/bolt/Passes/ValidateInternalCalls.h b/bolt/include/bolt/Passes/ValidateInternalCalls.h index ec1293b661b0..a6e92838ef23 100644 --- a/bolt/include/bolt/Passes/ValidateInternalCalls.h +++ b/bolt/include/bolt/Passes/ValidateInternalCalls.h @@ -1,12 +1,11 @@ -//===--- Passes/ValidateInternalCalls.h -----------------------------------===// +//===- bolt/Passes/ValidateInternalCalls.h ----------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// + #ifndef BOLT_PASSES_VALIDATEINTERNALCALLS_H #define BOLT_PASSES_VALIDATEINTERNALCALLS_H diff --git a/bolt/include/bolt/Passes/VeneerElimination.h b/bolt/include/bolt/Passes/VeneerElimination.h index b3a735fd3b89..ce50109257ce 100644 --- a/bolt/include/bolt/Passes/VeneerElimination.h +++ b/bolt/include/bolt/Passes/VeneerElimination.h @@ -1,12 +1,10 @@ -//===--- Passes/VeneerElimination.h ---------------------------------------===// +//===- bolt/Passes/VeneerElimination.h --------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_VENEER_ELIMINATION_H #define BOLT_PASSES_VENEER_ELIMINATION_H diff --git a/bolt/include/bolt/Profile/BoltAddressTranslation.h b/bolt/include/bolt/Profile/BoltAddressTranslation.h index 264d3c503e6f..2b1d471c79cd 100644 --- a/bolt/include/bolt/Profile/BoltAddressTranslation.h +++ b/bolt/include/bolt/Profile/BoltAddressTranslation.h @@ -1,12 +1,10 @@ -//===--- BoltAddressTranslation.h -----------------------------------------===// +//===- bolt/Profile/BoltAddressTranslation.h --------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PROFILE_BOLTADDRESSTRANSLATION_H #define BOLT_PROFILE_BOLTADDRESSTRANSLATION_H diff --git a/bolt/include/bolt/Profile/DataAggregator.h b/bolt/include/bolt/Profile/DataAggregator.h index 84963b9c4c17..5dc9273dfa32 100644 --- a/bolt/include/bolt/Profile/DataAggregator.h +++ b/bolt/include/bolt/Profile/DataAggregator.h @@ -1,4 +1,4 @@ -//===-- DataAggregator.h - Perf data aggregator -----------------*- C++ -*-===// +//===- bolt/Profile/DataAggregator.h - Perf data aggregator -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Profile/DataReader.h b/bolt/include/bolt/Profile/DataReader.h index 18637a1892ea..d47457a5e47d 100644 --- a/bolt/include/bolt/Profile/DataReader.h +++ b/bolt/include/bolt/Profile/DataReader.h @@ -1,4 +1,4 @@ -//===-- Reader/DataReader.h - Perf data reader ------------------*- C++ -*-===// +//===- bolt/Profile/DataReader.h - Perf data reader -------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Profile/Heatmap.h b/bolt/include/bolt/Profile/Heatmap.h index 8dfa359855f6..7ad72c512405 100644 --- a/bolt/include/bolt/Profile/Heatmap.h +++ b/bolt/include/bolt/Profile/Heatmap.h @@ -1,12 +1,10 @@ -//===-- Heatmap.h -----------------------------------------------*- C++ -*-===// +//===- bolt/Profile/Heatmap.h -----------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PROFILE_HEATMAP_H #define BOLT_PROFILE_HEATMAP_H diff --git a/bolt/include/bolt/Profile/ProfileReaderBase.h b/bolt/include/bolt/Profile/ProfileReaderBase.h index 72cf8e6c6124..dd23844f59a8 100644 --- a/bolt/include/bolt/Profile/ProfileReaderBase.h +++ b/bolt/include/bolt/Profile/ProfileReaderBase.h @@ -1,4 +1,4 @@ -//===-- ProfileReaderBase.h - Base class for profile readers ----*- C++ -*-===// +//===- bolt/Profile/ProfileReaderBase.h -------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Profile/ProfileYAMLMapping.h b/bolt/include/bolt/Profile/ProfileYAMLMapping.h index d13d20cde8cd..e20d449e0b93 100644 --- a/bolt/include/bolt/Profile/ProfileYAMLMapping.h +++ b/bolt/include/bolt/Profile/ProfileYAMLMapping.h @@ -1,4 +1,4 @@ -//===-- ProfileYAMLMapping.h - mappings for BOLT profile --------*- C++ -*-===// +//===- bolt/Profile/ProfileYAMLMapping.h ------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Profile/YAMLProfileReader.h b/bolt/include/bolt/Profile/YAMLProfileReader.h index 18f86c2be174..3c21a8e81ac4 100644 --- a/bolt/include/bolt/Profile/YAMLProfileReader.h +++ b/bolt/include/bolt/Profile/YAMLProfileReader.h @@ -1,12 +1,10 @@ -//===-- YAMLProfileReader.h - BOLT YAML profile deserializer ----*- C++ -*-===// +//===- bolt/Profile/YAMLProfileReader.h - YAML profile reader ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PROFILE_YAML_PROFILE_READER_H #define BOLT_PROFILE_YAML_PROFILE_READER_H diff --git a/bolt/include/bolt/Profile/YAMLProfileWriter.h b/bolt/include/bolt/Profile/YAMLProfileWriter.h index 21a187bf34e9..2d3009ca9175 100644 --- a/bolt/include/bolt/Profile/YAMLProfileWriter.h +++ b/bolt/include/bolt/Profile/YAMLProfileWriter.h @@ -1,13 +1,10 @@ -//===- YAMLProfileWriter.cpp - serialize profiling data in YAML -*- C++ -*-===// +//===- bolt/Profile/YAMLProfileWriter.h - Write profile in YAML -*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_PROFILE_YAML_PROFILE_WRITER_H #define BOLT_PROFILE_YAML_PROFILE_WRITER_H diff --git a/bolt/include/bolt/Rewrite/BinaryPassManager.h b/bolt/include/bolt/Rewrite/BinaryPassManager.h index 7cd156f37738..84ab192c415a 100644 --- a/bolt/include/bolt/Rewrite/BinaryPassManager.h +++ b/bolt/include/bolt/Rewrite/BinaryPassManager.h @@ -1,4 +1,4 @@ -//===--- BinaryPassManager.h - Binary-level analysis/optimization passes --===// +//===- bolt/Rewrite/BinaryPassManager.h - Binary-level passes ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Rewrite/DWARFRewriter.h b/bolt/include/bolt/Rewrite/DWARFRewriter.h index f20662cfeffc..a874980bc2cd 100644 --- a/bolt/include/bolt/Rewrite/DWARFRewriter.h +++ b/bolt/include/bolt/Rewrite/DWARFRewriter.h @@ -1,12 +1,10 @@ -//===--- DWARFRewriter.h --------------------------------------------------===// +//===- bolt/Rewrite/DWARFRewriter.h -----------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_REWRITE_DWARF_REWRITER_H #define BOLT_REWRITE_DWARF_REWRITER_H diff --git a/bolt/include/bolt/Rewrite/ExecutableFileMemoryManager.h b/bolt/include/bolt/Rewrite/ExecutableFileMemoryManager.h index e31e65fbfddf..9623beb7062e 100644 --- a/bolt/include/bolt/Rewrite/ExecutableFileMemoryManager.h +++ b/bolt/include/bolt/Rewrite/ExecutableFileMemoryManager.h @@ -1,12 +1,10 @@ -//===--- ExecutableFileMemoryManager.h ------------------------------------===// +//===- bolt/Rewrite/ExecutableFileMemoryManager.h ---------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #ifndef BOLT_REWRITE_EXECUTABLE_FILE_MEMORY_MANAGER_H #define BOLT_REWRITE_EXECUTABLE_FILE_MEMORY_MANAGER_H diff --git a/bolt/include/bolt/Rewrite/MachORewriteInstance.h b/bolt/include/bolt/Rewrite/MachORewriteInstance.h index 96d7431f6a99..81a6331b6462 100644 --- a/bolt/include/bolt/Rewrite/MachORewriteInstance.h +++ b/bolt/include/bolt/Rewrite/MachORewriteInstance.h @@ -1,4 +1,4 @@ -//===--- MachORewriteInstance.h - Instance of a rewriting process. --------===// +//===- bolt/Rewrite/MachORewriteInstance.h - MachO rewriter -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Rewrite/RewriteInstance.h b/bolt/include/bolt/Rewrite/RewriteInstance.h index d8a84eb87212..8298518f39ff 100644 --- a/bolt/include/bolt/Rewrite/RewriteInstance.h +++ b/bolt/include/bolt/Rewrite/RewriteInstance.h @@ -1,4 +1,4 @@ -//===--- RewriteInstance.h - Instance of a rewriting process. -------------===// +//===- bolt/Rewrite/RewriteInstance.h - ELF rewriter ------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/RuntimeLibs/HugifyRuntimeLibrary.h b/bolt/include/bolt/RuntimeLibs/HugifyRuntimeLibrary.h index b9fcef49aac5..4889708b13a3 100644 --- a/bolt/include/bolt/RuntimeLibs/HugifyRuntimeLibrary.h +++ b/bolt/include/bolt/RuntimeLibs/HugifyRuntimeLibrary.h @@ -1,10 +1,14 @@ -//===------- HugifyRuntimeLibrary.h - The Hugify Runtime Library ----------===// +//===- bolt/RuntimeLibs/HugifyRuntimeLibrary.h - Hugify Lib -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// +// This file contains the declaration of the HugifyRuntimeLibrary class. +// +//===----------------------------------------------------------------------===// #ifndef BOLT_RUNTIMELIBS_HUGIFY_RUNTIME_LIBRARY_H #define BOLT_RUNTIMELIBS_HUGIFY_RUNTIME_LIBRARY_H diff --git a/bolt/include/bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h b/bolt/include/bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h index ec18a6fa2f37..3257deab1db4 100644 --- a/bolt/include/bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h +++ b/bolt/include/bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h @@ -1,10 +1,15 @@ -//===--- InstrumentationRuntimeLibrary.h - The Instrument Runtime Library -===// +//===- bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// +// This file contains the declaration of the InstrumentationRuntimeLibrary +// class. +// +//===----------------------------------------------------------------------===// #ifndef BOLT_RUNTIMELIBS_INSTRUMENTATION_RUNTIME_LIBRARY_H #define BOLT_RUNTIMELIBS_INSTRUMENTATION_RUNTIME_LIBRARY_H diff --git a/bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h b/bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h index 1119604c2658..685458c47b90 100644 --- a/bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h +++ b/bolt/include/bolt/RuntimeLibs/RuntimeLibrary.h @@ -1,4 +1,4 @@ -//===------------- RuntimeLibrary.h - The Runtime Library -----------------===// +//===- bolt/RuntimeLibs/RuntimeLibrary.h - Runtime Library ------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,8 +6,9 @@ // //===----------------------------------------------------------------------===// // -// Provides all the necessary utilities to link runtime libraries during -// binary rewriting, such as the instrumentation runtime library. +// This file contains the declaration of the RuntimeLibrary class, which +// provides all the necessary utilities to link runtime libraries during binary +// rewriting, such as the instrumentation runtime library. // //===----------------------------------------------------------------------===// diff --git a/bolt/include/bolt/Utils/CommandLineOpts.h b/bolt/include/bolt/Utils/CommandLineOpts.h index 1a05ff83d7fc..e0f0ea306c3d 100644 --- a/bolt/include/bolt/Utils/CommandLineOpts.h +++ b/bolt/include/bolt/Utils/CommandLineOpts.h @@ -1,4 +1,4 @@ -//===--- CommandLineOpts.h - BOLT CLI options -----------------------------===// +//===- bolt/Utils/CommandLineOpts.h - BOLT CLI options ----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -9,6 +9,7 @@ // BOLT CLI options // //===----------------------------------------------------------------------===// + #ifndef BOLT_UTILS_COMMAND_LINE_OPTS_H #define BOLT_UTILS_COMMAND_LINE_OPTS_H diff --git a/bolt/include/bolt/Utils/NameResolver.h b/bolt/include/bolt/Utils/NameResolver.h index f2da1d38eaea..2e3ac20a532d 100644 --- a/bolt/include/bolt/Utils/NameResolver.h +++ b/bolt/include/bolt/Utils/NameResolver.h @@ -1,4 +1,4 @@ -//===--- NameResolver.h - Helper class for names deduplication ------------===// +//===- bolt/Utils/NameResolver.h - Names deduplication helper ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Utils/NameShortener.h b/bolt/include/bolt/Utils/NameShortener.h index 95bf7e1f1ad1..9c7b7ec9ba65 100644 --- a/bolt/include/bolt/Utils/NameShortener.h +++ b/bolt/include/bolt/Utils/NameShortener.h @@ -1,4 +1,4 @@ -//===--- NameShortener.h - Helper class for shortening names --------------===// +//===- bolt/Utils/NameShortener.h - Name shortener --------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/include/bolt/Utils/Utils.h b/bolt/include/bolt/Utils/Utils.h index 4a93f159e6d0..0f8122deb356 100644 --- a/bolt/include/bolt/Utils/Utils.h +++ b/bolt/include/bolt/Utils/Utils.h @@ -1,4 +1,4 @@ -//===--- Utils.h - Common helper functions --------------------------------===// +//===- bolt/Utils/Utils.h - Common helper functions -------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/lib/Core/BinaryBasicBlock.cpp b/bolt/lib/Core/BinaryBasicBlock.cpp index 0f5827d2f8bb..a7e6d324d09b 100644 --- a/bolt/lib/Core/BinaryBasicBlock.cpp +++ b/bolt/lib/Core/BinaryBasicBlock.cpp @@ -1,4 +1,4 @@ -//===--- BinaryBasicBlock.cpp - Interface for assembly-level basic block --===// +//===- bolt/Core/BinaryBasicBlock.cpp - Low-level basic block -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the BinaryBasicBlock class. +// //===----------------------------------------------------------------------===// #include "bolt/Core/BinaryBasicBlock.h" diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp index 9754448d6f20..72d2a6e4f2b3 100644 --- a/bolt/lib/Core/BinaryContext.cpp +++ b/bolt/lib/Core/BinaryContext.cpp @@ -1,4 +1,4 @@ -//===--- BinaryContext.cpp - Interface for machine-level context ---------===// +//===- bolt/Core/BinaryContext.cpp - Low-level context --------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the BinaryContext class. +// //===----------------------------------------------------------------------===// #include "bolt/Core/BinaryContext.h" diff --git a/bolt/lib/Core/BinaryData.cpp b/bolt/lib/Core/BinaryData.cpp index 58a3fcedac3e..bc555f91dc86 100644 --- a/bolt/lib/Core/BinaryData.cpp +++ b/bolt/lib/Core/BinaryData.cpp @@ -1,4 +1,4 @@ -//===--- BinaryData.cpp - Representation of section data objects ----------===// +//===- bolt/Core/BinaryData.cpp - Objects in a binary file ----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the BinaryData class. +// //===----------------------------------------------------------------------===// #include "bolt/Core/BinaryData.h" diff --git a/bolt/lib/Core/BinaryEmitter.cpp b/bolt/lib/Core/BinaryEmitter.cpp index 0d93b0517a88..ba9d8a7b258a 100644 --- a/bolt/lib/Core/BinaryEmitter.cpp +++ b/bolt/lib/Core/BinaryEmitter.cpp @@ -1,4 +1,4 @@ -//===--- BinaryEmitter.cpp - collection of functions to emit code and data ===// +//===- bolt/Core/BinaryEmitter.cpp - Emit code and data -------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// // +// This file implements the collection of functions and classes used for +// emission of code and data into object/binary file. +// //===----------------------------------------------------------------------===// #include "bolt/Core/BinaryEmitter.h" diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp index 2482fe0156e8..91bcf2bfc636 100644 --- a/bolt/lib/Core/BinaryFunction.cpp +++ b/bolt/lib/Core/BinaryFunction.cpp @@ -1,4 +1,4 @@ -//===--- BinaryFunction.cpp - Interface for machine-level function --------===// +//===- bolt/Core/BinaryFunction.cpp - Low-level function ------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the BinaryFunction class. +// //===----------------------------------------------------------------------===// #include "bolt/Core/BinaryFunction.h" diff --git a/bolt/lib/Core/BinaryFunctionProfile.cpp b/bolt/lib/Core/BinaryFunctionProfile.cpp index dba20d2ccbb9..370269df50a4 100644 --- a/bolt/lib/Core/BinaryFunctionProfile.cpp +++ b/bolt/lib/Core/BinaryFunctionProfile.cpp @@ -1,4 +1,4 @@ -//===--- BinaryFunctionProfile.cpp --------===// +//===- bolt/Core/BinaryFunctionProfile.cpp - Profile processing -----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// // +// This file implements BinaryFunction member functions related to processing +// the execution profile. +// //===----------------------------------------------------------------------===// #include "bolt/Core/BinaryBasicBlock.h" diff --git a/bolt/lib/Core/BinarySection.cpp b/bolt/lib/Core/BinarySection.cpp index d3173eb694a9..8cbb01c3e133 100644 --- a/bolt/lib/Core/BinarySection.cpp +++ b/bolt/lib/Core/BinarySection.cpp @@ -1,4 +1,4 @@ -//===--- BinarySection.cpp - Interface for object file section -----------===// +//===- bolt/Core/BinarySection.cpp - Section in a binary file -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the BinarySection class. +// //===----------------------------------------------------------------------===// #include "bolt/Core/BinarySection.h" diff --git a/bolt/lib/Core/DebugData.cpp b/bolt/lib/Core/DebugData.cpp index 844e5c94979e..82015c0f4cb5 100644 --- a/bolt/lib/Core/DebugData.cpp +++ b/bolt/lib/Core/DebugData.cpp @@ -1,4 +1,4 @@ -//===- DebugData.cpp - Representation and writing of debugging information. ==// +//===- bolt/Core/DebugData.cpp - Debugging information handling -----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements functions and classes for handling debug info. +// //===----------------------------------------------------------------------===// #include "bolt/Core/DebugData.h" diff --git a/bolt/lib/Core/DynoStats.cpp b/bolt/lib/Core/DynoStats.cpp index e1350b7bb3fc..dfb15f9f1442 100644 --- a/bolt/lib/Core/DynoStats.cpp +++ b/bolt/lib/Core/DynoStats.cpp @@ -1,4 +1,4 @@ -//===--- DynoStats.cpp ----------------------------------------------------===// +//===- bolt/Core/DynoStats.cpp - Dynamic execution stats ------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the DynoStats class. +// //===----------------------------------------------------------------------===// #include "bolt/Core/DynoStats.h" diff --git a/bolt/lib/Core/Exceptions.cpp b/bolt/lib/Core/Exceptions.cpp index 175a3f3928fa..b7c27e848f0b 100644 --- a/bolt/lib/Core/Exceptions.cpp +++ b/bolt/lib/Core/Exceptions.cpp @@ -1,4 +1,4 @@ -//===-- Exceptions.cpp - Helpers for processing C++ exceptions ------------===// +//===- bolt/Core/Exceptions.cpp - Helpers for C++ exceptions --------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements functions for handling C++ exception meta data. +// // Some of the code is taken from examples/ExceptionDemo // //===----------------------------------------------------------------------===// diff --git a/bolt/lib/Core/JumpTable.cpp b/bolt/lib/Core/JumpTable.cpp index 18c3869b09d0..e731935afd2d 100644 --- a/bolt/lib/Core/JumpTable.cpp +++ b/bolt/lib/Core/JumpTable.cpp @@ -1,4 +1,4 @@ -//===--- JumpTable.h - Representation of a jump table ---------------------===// +//===- bolt/Core/JumpTable.cpp - Jump table at low-level IR ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the JumpTable class. +// //===----------------------------------------------------------------------===// #include "bolt/Core/JumpTable.h" diff --git a/bolt/lib/Core/MCPlusBuilder.cpp b/bolt/lib/Core/MCPlusBuilder.cpp index 3c3150ae4424..0cb13d08c3a1 100644 --- a/bolt/lib/Core/MCPlusBuilder.cpp +++ b/bolt/lib/Core/MCPlusBuilder.cpp @@ -1,4 +1,4 @@ -//===- MCPlusBuilder.cpp - main interface for MCPlus-level instructions ---===// +//===- bolt/Core/MCPlusBuilder.cpp - Interface for MCPlus -----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// Create/analyze/modify instructions at MC+ level. +// This file implements the MCPlusBuilder class. // //===----------------------------------------------------------------------===// diff --git a/bolt/lib/Core/ParallelUtilities.cpp b/bolt/lib/Core/ParallelUtilities.cpp index b29bfd18b006..90f3bb30450e 100644 --- a/bolt/lib/Core/ParallelUtilities.cpp +++ b/bolt/lib/Core/ParallelUtilities.cpp @@ -1,4 +1,4 @@ -//===--- ParallelUtilities.cpp --------------------------------------------===// +//===- bolt/Core/ParallelUtilities.cpp - Parallel utilities ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// Implementation of the class that manages parallel work on BinaryFunctions. +// //===----------------------------------------------------------------------===// #include "bolt/Core/ParallelUtilities.h" diff --git a/bolt/lib/Core/Relocation.cpp b/bolt/lib/Core/Relocation.cpp index 0d06cbb967cb..60d50d14be86 100644 --- a/bolt/lib/Core/Relocation.cpp +++ b/bolt/lib/Core/Relocation.cpp @@ -1,4 +1,4 @@ -//===--- Relocation.cpp - Interface for object file relocations ----------===// +//===- bolt/Core/Relocation.cpp - Object file relocations -----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the Relocation class. +// //===----------------------------------------------------------------------===// #include "bolt/Core/Relocation.h" diff --git a/bolt/lib/Passes/ADRRelaxationPass.cpp b/bolt/lib/Passes/ADRRelaxationPass.cpp index 72b847ff5eda..2a9a1db9060e 100644 --- a/bolt/lib/Passes/ADRRelaxationPass.cpp +++ b/bolt/lib/Passes/ADRRelaxationPass.cpp @@ -1,4 +1,4 @@ -//===--- ADRRelaxationPass.cpp --------------------------------------------===// +//===- bolt/Passes/ADRRelaxationPass.cpp ----------------------------------===// // // The LLVM Compiler Infrastructure // @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the ADRRelaxationPass class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/ADRRelaxationPass.h" diff --git a/bolt/lib/Passes/Aligner.cpp b/bolt/lib/Passes/Aligner.cpp index 4ffa0e1c9886..a4d3f5566f34 100644 --- a/bolt/lib/Passes/Aligner.cpp +++ b/bolt/lib/Passes/Aligner.cpp @@ -1,4 +1,4 @@ -//===--- Aligner.cpp ------------------------------------------------------===// +//===- bolt/Passes/Aligner.cpp - Pass for optimal code alignment ----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the AlignerPass class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/Aligner.h" diff --git a/bolt/lib/Passes/AllocCombiner.cpp b/bolt/lib/Passes/AllocCombiner.cpp index 03dc44950d13..a56939cdf492 100644 --- a/bolt/lib/Passes/AllocCombiner.cpp +++ b/bolt/lib/Passes/AllocCombiner.cpp @@ -1,4 +1,4 @@ -//===--- Passes/AllocCombiner.cpp -----------------------------------------===// +//===- bolt/Passes/AllocCombiner.cpp --------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the AllocCombinerPass class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/AllocCombiner.h" diff --git a/bolt/lib/Passes/AsmDump.cpp b/bolt/lib/Passes/AsmDump.cpp index f837a7f54fd9..ebd831843428 100644 --- a/bolt/lib/Passes/AsmDump.cpp +++ b/bolt/lib/Passes/AsmDump.cpp @@ -1,4 +1,4 @@ -//===--- AsmDump.cpp - Dumping of a BinaryFunction into assembly --------===// +//===- bolt/Passes/AsmDump.cpp - Dump BinaryFunction into assembly --------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the AsmDumpPass class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/AsmDump.h" diff --git a/bolt/lib/Passes/BinaryFunctionCallGraph.cpp b/bolt/lib/Passes/BinaryFunctionCallGraph.cpp index ab903102febe..d733a8e6e760 100644 --- a/bolt/lib/Passes/BinaryFunctionCallGraph.cpp +++ b/bolt/lib/Passes/BinaryFunctionCallGraph.cpp @@ -1,4 +1,4 @@ -//===--- Passes/BinaryFunctionCallGraph.cpp -------------------------------===// +//===- bolt/Passes/BinaryFunctionCallGraph.cpp ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the BinaryFunctionCallGraph class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/BinaryFunctionCallGraph.h" diff --git a/bolt/lib/Passes/BinaryPasses.cpp b/bolt/lib/Passes/BinaryPasses.cpp index 1ea3f5e6ca24..315a8043a028 100644 --- a/bolt/lib/Passes/BinaryPasses.cpp +++ b/bolt/lib/Passes/BinaryPasses.cpp @@ -1,4 +1,4 @@ -//===--- BinaryPasses.cpp - Binary-level analysis/optimization passes -----===// +//===- bolt/Passes/BinaryPasses.cpp - Binary-level passes -----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements multiple passes for binary optimization and analysis. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/BinaryPasses.h" diff --git a/bolt/lib/Passes/CacheMetrics.cpp b/bolt/lib/Passes/CacheMetrics.cpp index ebaf09d7736c..eb3ae4e70ba8 100644 --- a/bolt/lib/Passes/CacheMetrics.cpp +++ b/bolt/lib/Passes/CacheMetrics.cpp @@ -1,4 +1,4 @@ -//===------ CacheMetrics.cpp - Calculate metrics for instruction cache ----===// +//===- bolt/Passes/CacheMetrics.cpp - Metrics for instruction cache -------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// // -// Functions to show metrics of cache lines +// This file implements the CacheMetrics class and functions for showing metrics +// of cache lines. // //===----------------------------------------------------------------------===// diff --git a/bolt/lib/Passes/CallGraph.cpp b/bolt/lib/Passes/CallGraph.cpp index b8981a00e8f7..3d4157509700 100644 --- a/bolt/lib/Passes/CallGraph.cpp +++ b/bolt/lib/Passes/CallGraph.cpp @@ -1,4 +1,4 @@ -//===--- Passes/CallGraph.cpp ---------------------------------------------===// +//===- bolt/Passes/CallGraph.cpp ------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the CallGraph class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/CallGraph.h" diff --git a/bolt/lib/Passes/CallGraphWalker.cpp b/bolt/lib/Passes/CallGraphWalker.cpp index 7bdd9b6c496a..53fb1cb4d98c 100644 --- a/bolt/lib/Passes/CallGraphWalker.cpp +++ b/bolt/lib/Passes/CallGraphWalker.cpp @@ -1,4 +1,4 @@ -//===--- CallGraphWalker.cpp ----------------------------------------------===// +//===- bolt/Passes/CallGraphWalker.cpp ------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the CallGraphWalker class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/CallGraphWalker.h" diff --git a/bolt/lib/Passes/DataflowAnalysis.cpp b/bolt/lib/Passes/DataflowAnalysis.cpp index 8c91e71f518d..9cf2cabdf9df 100644 --- a/bolt/lib/Passes/DataflowAnalysis.cpp +++ b/bolt/lib/Passes/DataflowAnalysis.cpp @@ -1,4 +1,4 @@ -//===--- Passes/DataflowAnalysis.cpp --------------------------------------===// +//===- bolt/Passes/DataflowAnalysis.cpp -----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements functions and classes used for data-flow analysis. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/DataflowAnalysis.h" diff --git a/bolt/lib/Passes/DataflowInfoManager.cpp b/bolt/lib/Passes/DataflowInfoManager.cpp index 0d33be887b7c..c31ce59db873 100644 --- a/bolt/lib/Passes/DataflowInfoManager.cpp +++ b/bolt/lib/Passes/DataflowInfoManager.cpp @@ -1,4 +1,4 @@ -//===--- Passes/DataflowInfoManager.cpp -----------------------------------===// +//===- bolt/Passes/DataflowInfoManager.cpp --------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the DataflowInfoManager class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/DataflowInfoManager.h" diff --git a/bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp b/bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp index 08bef3d89dd5..3329b233a172 100644 --- a/bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp +++ b/bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp @@ -1,10 +1,11 @@ -//===--- ExtTSPReorderAlgorithm.cpp - Order basic blocks ---------------===// +//===- bolt/Passes/ExtTSPReorderAlgorithm.cpp - Order basic blocks --------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// // ExtTSP - layout of basic blocks with i-cache optimization. // // The algorithm is a greedy heuristic that works with chains (ordered lists) @@ -28,7 +29,9 @@ // * A. Newell and S. Pupyrev, Improved Basic Block Reordering, // IEEE Transactions on Computers, 2020 // https://arxiv.org/abs/1809.04676 +// //===----------------------------------------------------------------------===// + #include "bolt/Core/BinaryBasicBlock.h" #include "bolt/Core/BinaryFunction.h" #include "bolt/Passes/ReorderAlgorithm.h" @@ -36,6 +39,7 @@ using namespace llvm; using namespace bolt; + namespace opts { extern cl::OptionCategory BoltOptCategory; diff --git a/bolt/lib/Passes/FrameAnalysis.cpp b/bolt/lib/Passes/FrameAnalysis.cpp index ab10e43169bd..9907543243c4 100644 --- a/bolt/lib/Passes/FrameAnalysis.cpp +++ b/bolt/lib/Passes/FrameAnalysis.cpp @@ -1,4 +1,4 @@ -//===--- Passes/FrameAnalysis.cpp -----------------------------------------===// +//===- bolt/Passes/FrameAnalysis.cpp --------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,10 @@ // //===----------------------------------------------------------------------===// // +// This file implements the FrameAnalysis class. +// //===----------------------------------------------------------------------===// + #include "bolt/Passes/FrameAnalysis.h" #include "bolt/Core/ParallelUtilities.h" #include "bolt/Passes/CallGraphWalker.h" diff --git a/bolt/lib/Passes/FrameOptimizer.cpp b/bolt/lib/Passes/FrameOptimizer.cpp index 8017f5d185cd..04270faa2f5d 100644 --- a/bolt/lib/Passes/FrameOptimizer.cpp +++ b/bolt/lib/Passes/FrameOptimizer.cpp @@ -1,4 +1,4 @@ -//===--- Passes/FrameOptimizer.cpp ----------------------------------------===// +//===- bolt/Passes/FrameOptimizer.cpp -------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the FrameOptimizerPass class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/FrameOptimizer.h" diff --git a/bolt/lib/Passes/HFSort.cpp b/bolt/lib/Passes/HFSort.cpp index 6e57aaf30ae6..1f72662bb812 100644 --- a/bolt/lib/Passes/HFSort.cpp +++ b/bolt/lib/Passes/HFSort.cpp @@ -1,4 +1,4 @@ -//===--- HFSort.cpp - Cluster functions by hotness ------------------------===// +//===- bolt/Passes/HFSort.cpp - Cluster functions by hotness --------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/lib/Passes/HFSortPlus.cpp b/bolt/lib/Passes/HFSortPlus.cpp index 7abbd3b4c12f..f1214cf054b4 100644 --- a/bolt/lib/Passes/HFSortPlus.cpp +++ b/bolt/lib/Passes/HFSortPlus.cpp @@ -1,4 +1,4 @@ -//===--- HFSortPlus.cpp - Order functions by hotness ----------------------===// +//===- bolt/Passes/HFSortPlus.cpp - Order functions by hotness ------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// // -//===----------------------------------------------------------------------===// -// // hfsort+ - layout of hot functions with i-TLB cache optimization. // // Given an ordering of hot functions (and hence, their assignment to the @@ -21,6 +19,8 @@ // proportional to the number of samples corresponding to the functions on the // page. The following algorithm detects short and long calls, and optimizes // the expected number of cache misses for the long ones. +// +//===----------------------------------------------------------------------===// #include "bolt/Passes/HFSort.h" #include "llvm/Support/CommandLine.h" diff --git a/bolt/lib/Passes/IdenticalCodeFolding.cpp b/bolt/lib/Passes/IdenticalCodeFolding.cpp index d05c11d4e905..a32607608b9a 100644 --- a/bolt/lib/Passes/IdenticalCodeFolding.cpp +++ b/bolt/lib/Passes/IdenticalCodeFolding.cpp @@ -1,4 +1,4 @@ -//===--- IdenticalCodeFolding.cpp -----------------------------------------===// +//===- bolt/Passes/IdenticalCodeFolding.cpp -------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the IdenticalCodeFolding class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/IdenticalCodeFolding.h" diff --git a/bolt/lib/Passes/IndirectCallPromotion.cpp b/bolt/lib/Passes/IndirectCallPromotion.cpp index 97a554bdc9b3..d4428c1cd282 100644 --- a/bolt/lib/Passes/IndirectCallPromotion.cpp +++ b/bolt/lib/Passes/IndirectCallPromotion.cpp @@ -1,4 +1,4 @@ -//===--- BinaryPasses.cpp - Binary-level analysis/optimization passes -----===// +//===- bolt/Passes/IndirectCallPromotion.cpp ------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the IndirectCallPromotion class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/IndirectCallPromotion.h" diff --git a/bolt/lib/Passes/Inliner.cpp b/bolt/lib/Passes/Inliner.cpp index 64cecb99e593..35f4e5da7a18 100644 --- a/bolt/lib/Passes/Inliner.cpp +++ b/bolt/lib/Passes/Inliner.cpp @@ -1,4 +1,4 @@ -//===--- Passes/Inliner.cpp - Inlining infra for BOLT ---------------------===// +//===- bolt/Passes/Inliner.cpp - Inlining pass for low-level binary IR ----===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the Inliner class used for inlining binary functions. +// // The current inliner has a limited callee support // (see Inliner::getInliningInfo() for the most up-to-date details): // diff --git a/bolt/lib/Passes/Instrumentation.cpp b/bolt/lib/Passes/Instrumentation.cpp index 7d8679e70fb1..55f5085befa3 100644 --- a/bolt/lib/Passes/Instrumentation.cpp +++ b/bolt/lib/Passes/Instrumentation.cpp @@ -1,4 +1,4 @@ -//===--- Passes/Instrumentation.cpp ---------------------------------------===// +//===- bolt/Passes/Instrumentation.cpp ------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the Instrumentation class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/Instrumentation.h" diff --git a/bolt/lib/Passes/JTFootprintReduction.cpp b/bolt/lib/Passes/JTFootprintReduction.cpp index e060ee5bde3c..192754c760e5 100644 --- a/bolt/lib/Passes/JTFootprintReduction.cpp +++ b/bolt/lib/Passes/JTFootprintReduction.cpp @@ -1,4 +1,4 @@ -//===--- JTFootprintReduction.cpp -----------------------------------------===// +//===- bolt/Passes/JTFootprintReduction.cpp -------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements JTFootprintReduction class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/JTFootprintReduction.h" diff --git a/bolt/lib/Passes/LivenessAnalysis.cpp b/bolt/lib/Passes/LivenessAnalysis.cpp index b622179ea7ce..ee0090c6ed44 100644 --- a/bolt/lib/Passes/LivenessAnalysis.cpp +++ b/bolt/lib/Passes/LivenessAnalysis.cpp @@ -1,12 +1,11 @@ -//===--- Passes/LivenessAnalysis.cpp --------------------------------------===// +//===- bolt/Passes/LivenessAnalysis.cpp -----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// + #include "bolt/Passes/LivenessAnalysis.h" namespace llvm { diff --git a/bolt/lib/Passes/LongJmp.cpp b/bolt/lib/Passes/LongJmp.cpp index cabcae326790..ba704da1cc3f 100644 --- a/bolt/lib/Passes/LongJmp.cpp +++ b/bolt/lib/Passes/LongJmp.cpp @@ -1,4 +1,4 @@ -//===--- Passes/LongJmp.cpp -----------------------------------------------===// +//===- bolt/Passes/LongJmp.cpp --------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the LongJmpPass class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/LongJmp.h" diff --git a/bolt/lib/Passes/LoopInversionPass.cpp b/bolt/lib/Passes/LoopInversionPass.cpp index 44a1b37e2f64..2f32703eb367 100644 --- a/bolt/lib/Passes/LoopInversionPass.cpp +++ b/bolt/lib/Passes/LoopInversionPass.cpp @@ -1,4 +1,4 @@ -//===--------- Passes/LoopInversionPass.cpp -------------------------------===// +//===- bolt/Passes/LoopInversionPass.cpp ----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the LoopInversionPass class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/LoopInversionPass.h" diff --git a/bolt/lib/Passes/MCF.cpp b/bolt/lib/Passes/MCF.cpp index f478d6c873a0..d63e522f1e0b 100644 --- a/bolt/lib/Passes/MCF.cpp +++ b/bolt/lib/Passes/MCF.cpp @@ -1,4 +1,4 @@ -//===--- Passes/MCF.cpp ---------------------------------------------------===// +//===- bolt/Passes/MCF.cpp ------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements functions for solving minimum-cost flow problem. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/MCF.h" diff --git a/bolt/lib/Passes/PLTCall.cpp b/bolt/lib/Passes/PLTCall.cpp index 0cda28041ffe..f12ae9fe6ac1 100644 --- a/bolt/lib/Passes/PLTCall.cpp +++ b/bolt/lib/Passes/PLTCall.cpp @@ -1,4 +1,4 @@ -//===--- Passes/PLTCall.h - PLT call optimization -------------------------===// +//===- bolt/Passes/PLTCall.h - PLT call optimization ----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// // -// Replace calls to PLT entries with indirect calls against GOT. +// This file implements the PLTCall class, which replaces calls to PLT entries +// with indirect calls against GOT. // //===----------------------------------------------------------------------===// diff --git a/bolt/lib/Passes/PatchEntries.cpp b/bolt/lib/Passes/PatchEntries.cpp index 974a9e2df9b5..e049dee97e43 100644 --- a/bolt/lib/Passes/PatchEntries.cpp +++ b/bolt/lib/Passes/PatchEntries.cpp @@ -1,4 +1,4 @@ -//===--- Passes/PatchEntries.cpp - pass for patching function entries -----===// +//===- bolt/Passes/PatchEntries.cpp - Pass for patching function entries --===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// // -// Pass for patching original function entry points. +// This file implements the PatchEntries class that is used for patching +// the original function entry points. // //===----------------------------------------------------------------------===// diff --git a/bolt/lib/Passes/PettisAndHansen.cpp b/bolt/lib/Passes/PettisAndHansen.cpp index 1d9afd451969..2dfaf201625a 100644 --- a/bolt/lib/Passes/PettisAndHansen.cpp +++ b/bolt/lib/Passes/PettisAndHansen.cpp @@ -1,4 +1,4 @@ -//===--- Passes/PettisAndHansen.cpp ---------------------------------------===// +//===- bolt/Passes/PettisAndHansen.cpp ------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// The file implements Pettis and Hansen code-layout algorithm. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/HFSort.h" diff --git a/bolt/lib/Passes/RegAnalysis.cpp b/bolt/lib/Passes/RegAnalysis.cpp index 88e2ff030b18..55f55bc48a5c 100644 --- a/bolt/lib/Passes/RegAnalysis.cpp +++ b/bolt/lib/Passes/RegAnalysis.cpp @@ -1,4 +1,4 @@ -//===--- RegAnalysis.cpp --------------------------------------------------===// +//===- bolt/Passes/RegAnalysis.cpp ----------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the RegAnalysis class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/RegAnalysis.h" diff --git a/bolt/lib/Passes/RegReAssign.cpp b/bolt/lib/Passes/RegReAssign.cpp index 69489c903dd3..9938cb5cd794 100644 --- a/bolt/lib/Passes/RegReAssign.cpp +++ b/bolt/lib/Passes/RegReAssign.cpp @@ -1,4 +1,4 @@ -//===--- Passes/RegReAssign.cpp -------------------------------------------===// +//===- bolt/Passes/RegReAssign.cpp ----------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the RegReAssign class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/RegReAssign.h" diff --git a/bolt/lib/Passes/ReorderAlgorithm.cpp b/bolt/lib/Passes/ReorderAlgorithm.cpp index 2d441b3584dc..5f9594575b57 100644 --- a/bolt/lib/Passes/ReorderAlgorithm.cpp +++ b/bolt/lib/Passes/ReorderAlgorithm.cpp @@ -1,4 +1,4 @@ -//===--- Passes/ReorderAlgorithm.cpp - Basic block reorderng algorithms ---===// +//===- bolt/Passes/ReorderAlgorithm.cpp - Basic block reordering ----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// // -// Implements different basic block reordering algorithms. +// This file implements classes used by several basic block reordering +// algorithms. // //===----------------------------------------------------------------------===// diff --git a/bolt/lib/Passes/ReorderData.cpp b/bolt/lib/Passes/ReorderData.cpp index 6d180de850d3..b6f0c2460016 100644 --- a/bolt/lib/Passes/ReorderData.cpp +++ b/bolt/lib/Passes/ReorderData.cpp @@ -1,4 +1,4 @@ -//===--- ReorderSection.cpp - Profile based reordering of section data =======// +//===- bolt/Passes/ReorderSection.cpp - Reordering of section data --------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements ReorderData class. +// //===----------------------------------------------------------------------===// // TODO: diff --git a/bolt/lib/Passes/ReorderFunctions.cpp b/bolt/lib/Passes/ReorderFunctions.cpp index ec734a264038..2c6afcf7abd4 100644 --- a/bolt/lib/Passes/ReorderFunctions.cpp +++ b/bolt/lib/Passes/ReorderFunctions.cpp @@ -1,4 +1,4 @@ -//===--- ReorderFunctions.cpp - Function reordering pass ------------ -----===// +//===- bolt/Passes/ReorderFunctions.cpp - Function reordering pass --------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements ReorderFunctions class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/ReorderFunctions.h" diff --git a/bolt/lib/Passes/RetpolineInsertion.cpp b/bolt/lib/Passes/RetpolineInsertion.cpp index e2082b5bc946..8d758a869ea6 100644 --- a/bolt/lib/Passes/RetpolineInsertion.cpp +++ b/bolt/lib/Passes/RetpolineInsertion.cpp @@ -1,4 +1,4 @@ -//===--- Passes/RetpolineInsertion.cpp-------------------------------------===// +//===- bolt/Passes/RetpolineInsertion.cpp ---------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// // -// This class implements a pass that replaces indirect branches (calls and -// jumps) with calls to retpolines to protect against branch target injection -// attacks. +// This file implements RetpolineInsertion class, which replaces indirect +// branches (calls and jumps) with calls to retpolines to protect against branch +// target injection attacks. // A unique retpoline is created for each register holding the address of the // callee, if the callee address is in memory %r11 is used if available to // hold the address of the callee before calling the retpoline, otherwise an @@ -18,7 +18,9 @@ // option, by default %r11 is assumed not available. // Adding lfence instruction to the body of the speculate code is enabled by // default and can be controlled by the user using retpoline-lfence option. +// //===----------------------------------------------------------------------===// + #include "bolt/Passes/RetpolineInsertion.h" #include "llvm/Support/raw_ostream.h" diff --git a/bolt/lib/Passes/ShrinkWrapping.cpp b/bolt/lib/Passes/ShrinkWrapping.cpp index 8ee6de1f55d0..84721e7a7447 100644 --- a/bolt/lib/Passes/ShrinkWrapping.cpp +++ b/bolt/lib/Passes/ShrinkWrapping.cpp @@ -1,4 +1,4 @@ -//===--- Passes/ShrinkWrapping.cpp ----------------------------------------===// +//===- bolt/Passes/ShrinkWrapping.cpp -------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the ShrinkWrapping class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/ShrinkWrapping.h" diff --git a/bolt/lib/Passes/SplitFunctions.cpp b/bolt/lib/Passes/SplitFunctions.cpp index 92ef63da8e34..53e0b7b8d4ba 100644 --- a/bolt/lib/Passes/SplitFunctions.cpp +++ b/bolt/lib/Passes/SplitFunctions.cpp @@ -1,4 +1,4 @@ -//===--- SplitFunctions.cpp - pass for splitting function code ------------===// +//===- bolt/Passes/SplitFunctions.cpp - Pass for splitting function code --===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the SplitFunctions pass. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/SplitFunctions.h" diff --git a/bolt/lib/Passes/StackAllocationAnalysis.cpp b/bolt/lib/Passes/StackAllocationAnalysis.cpp index 8718256c6eee..92ad2ccac854 100644 --- a/bolt/lib/Passes/StackAllocationAnalysis.cpp +++ b/bolt/lib/Passes/StackAllocationAnalysis.cpp @@ -1,4 +1,4 @@ -//===--- Passes/StackAllocationAnalysis.cpp -------------------------------===// +//===- bolt/Passes/StackAllocationAnalysis.cpp ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the StackAllocationAnalysis class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/StackAllocationAnalysis.h" diff --git a/bolt/lib/Passes/StackAvailableExpressions.cpp b/bolt/lib/Passes/StackAvailableExpressions.cpp index 05eafe7f2065..20a30552604d 100644 --- a/bolt/lib/Passes/StackAvailableExpressions.cpp +++ b/bolt/lib/Passes/StackAvailableExpressions.cpp @@ -1,4 +1,4 @@ -//===--- Passes/StackAvailableExpressions.cpp -----------------------------===// +//===- bolt/Passes/StackAvailableExpressions.cpp --------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the StackAvailableExpressions class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/StackAvailableExpressions.h" diff --git a/bolt/lib/Passes/StackPointerTracking.cpp b/bolt/lib/Passes/StackPointerTracking.cpp index e015aba2f983..0749bf7c78fa 100644 --- a/bolt/lib/Passes/StackPointerTracking.cpp +++ b/bolt/lib/Passes/StackPointerTracking.cpp @@ -1,4 +1,4 @@ -//===--- Passes/StackPointerTracking.cpp ----------------------------------===// +//===- bolt/Passes/StackPointerTracking.cpp -------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the StackPointerTracking class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/StackPointerTracking.h" diff --git a/bolt/lib/Passes/StackReachingUses.cpp b/bolt/lib/Passes/StackReachingUses.cpp index 9c7ee3651f70..567a5386bf0a 100644 --- a/bolt/lib/Passes/StackReachingUses.cpp +++ b/bolt/lib/Passes/StackReachingUses.cpp @@ -1,4 +1,4 @@ -//===--- Passes/StackReachingUses.cpp -------------------------------------===// +//===- bolt/Passes/StackReachingUses.cpp ----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,10 @@ // //===----------------------------------------------------------------------===// // +// This file implements the StackReachingUses class. +// //===----------------------------------------------------------------------===// + #include "bolt/Passes/StackReachingUses.h" #include "bolt/Passes/FrameAnalysis.h" diff --git a/bolt/lib/Passes/StokeInfo.cpp b/bolt/lib/Passes/StokeInfo.cpp index e7e9ff256093..b0ee61786fde 100644 --- a/bolt/lib/Passes/StokeInfo.cpp +++ b/bolt/lib/Passes/StokeInfo.cpp @@ -1,4 +1,4 @@ -//===--- Passes/StokeInfo.cpp ---------------------------------------------===// +//===- bolt/Passes/StokeInfo.cpp ------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the StokeInfo class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/StokeInfo.h" diff --git a/bolt/lib/Passes/TailDuplication.cpp b/bolt/lib/Passes/TailDuplication.cpp index 8dbe390e6052..f7c06883d9c8 100644 --- a/bolt/lib/Passes/TailDuplication.cpp +++ b/bolt/lib/Passes/TailDuplication.cpp @@ -1,4 +1,4 @@ -//===--------- Passes/TailDuplication.cpp -------------------------------===// +//===- bolt/Passes/TailDuplication.cpp ------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,10 +6,11 @@ // //===----------------------------------------------------------------------===// // +// This file implements the TailDuplication class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/TailDuplication.h" - #include #define DEBUG_TYPE "taildup" diff --git a/bolt/lib/Passes/ThreeWayBranch.cpp b/bolt/lib/Passes/ThreeWayBranch.cpp index 32c72d6c6a3d..e611c5542322 100644 --- a/bolt/lib/Passes/ThreeWayBranch.cpp +++ b/bolt/lib/Passes/ThreeWayBranch.cpp @@ -1,4 +1,4 @@ -//===--------- Passes/ThreeWayBranch.cpp ----------------------------------===// +//===- bolt/Passes/ThreeWayBranch.cpp -------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the ThreeWayBranch class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/ThreeWayBranch.h" diff --git a/bolt/lib/Passes/ValidateInternalCalls.cpp b/bolt/lib/Passes/ValidateInternalCalls.cpp index 76c34c0ac849..68230fdc9c07 100644 --- a/bolt/lib/Passes/ValidateInternalCalls.cpp +++ b/bolt/lib/Passes/ValidateInternalCalls.cpp @@ -1,4 +1,4 @@ -//===--- Passes/ValidateInternalCalls.cpp ---------------------------------===// +//===- bolt/Passes/ValidateInternalCalls.cpp ------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the ValidateInternalCalls class. +// //===----------------------------------------------------------------------===// #include "bolt/Passes/ValidateInternalCalls.h" diff --git a/bolt/lib/Passes/VeneerElimination.cpp b/bolt/lib/Passes/VeneerElimination.cpp index 62b4512b9b38..612f6918efda 100644 --- a/bolt/lib/Passes/VeneerElimination.cpp +++ b/bolt/lib/Passes/VeneerElimination.cpp @@ -1,4 +1,4 @@ -//===--- Passes/VeneerElimination.cpp--------------------------------------===// +//===- bolt/Passes/VeneerElimination.cpp ----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -10,6 +10,7 @@ // code and redirects veneer callers to call to veneers destinations // //===----------------------------------------------------------------------===// + #include "bolt/Passes/VeneerElimination.h" #define DEBUG_TYPE "veneer-elim" diff --git a/bolt/lib/Profile/BoltAddressTranslation.cpp b/bolt/lib/Profile/BoltAddressTranslation.cpp index 0f1ca99492c9..e2c0080fa07f 100644 --- a/bolt/lib/Profile/BoltAddressTranslation.cpp +++ b/bolt/lib/Profile/BoltAddressTranslation.cpp @@ -1,12 +1,11 @@ -//===--- BoltAddressTranslation.cpp ---------------------------------------===// +//===- bolt/Profile/BoltAddressTranslation.cpp ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// + #include "bolt/Profile/BoltAddressTranslation.h" #include "bolt/Core/BinaryFunction.h" #include "llvm/Support/DataExtractor.h" diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp index 48a813fb15f4..2ec8d464508e 100644 --- a/bolt/lib/Profile/DataAggregator.cpp +++ b/bolt/lib/Profile/DataAggregator.cpp @@ -1,4 +1,4 @@ -//===-- DataAggregator.cpp - Perf data aggregator ---------------*- C++ -*-===// +//===- bolt/Profile/DataAggregator.cpp - Perf data aggregator -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/lib/Profile/DataReader.cpp b/bolt/lib/Profile/DataReader.cpp index d0eb422a28fc..e175693e6cd1 100644 --- a/bolt/lib/Profile/DataReader.cpp +++ b/bolt/lib/Profile/DataReader.cpp @@ -1,4 +1,4 @@ -//===-- DataReader.cpp - Perf data reader -----------------------*- C++ -*-===// +//===- bolt/Profile/DataReader.cpp - Perf data reader ---------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/lib/Profile/Heatmap.cpp b/bolt/lib/Profile/Heatmap.cpp index 8b42e6f1e7f7..220e057fe03e 100644 --- a/bolt/lib/Profile/Heatmap.cpp +++ b/bolt/lib/Profile/Heatmap.cpp @@ -1,12 +1,10 @@ -//===-- Heatmap.cpp ---------------------------------------------*- C++ -*-===// +//===- bolt/Profile/Heatmap.cpp -------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #include "bolt/Profile/Heatmap.h" #include "bolt/Utils/CommandLineOpts.h" diff --git a/bolt/lib/Profile/ProfileReaderBase.cpp b/bolt/lib/Profile/ProfileReaderBase.cpp index 5697a1ed0591..ee6166b1da36 100644 --- a/bolt/lib/Profile/ProfileReaderBase.cpp +++ b/bolt/lib/Profile/ProfileReaderBase.cpp @@ -1,4 +1,4 @@ -//===-- ProfileReaderBase.cpp - Base class for profile readers --*- C++ -*-===// +//===- bolt/Profile/ProfileReaderBase.cpp ---------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/lib/Profile/YAMLProfileReader.cpp b/bolt/lib/Profile/YAMLProfileReader.cpp index cb135998aada..7e20cb46ec66 100644 --- a/bolt/lib/Profile/YAMLProfileReader.cpp +++ b/bolt/lib/Profile/YAMLProfileReader.cpp @@ -1,12 +1,10 @@ -//===-- YAMLProfileReader.cpp - BOLT YAML profile de-serializer -*- C++ -*-===// +//===- bolt/Profile/YAMLProfileReader.cpp - YAML profile de-serializer ----===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #include "bolt/Profile/YAMLProfileReader.h" #include "bolt/Core/BinaryBasicBlock.h" diff --git a/bolt/lib/Profile/YAMLProfileWriter.cpp b/bolt/lib/Profile/YAMLProfileWriter.cpp index cc6a20818b42..11c0dcc6ff95 100644 --- a/bolt/lib/Profile/YAMLProfileWriter.cpp +++ b/bolt/lib/Profile/YAMLProfileWriter.cpp @@ -1,13 +1,10 @@ -//===- YAMLProfileWriter.cpp - serialize profiling data in YAML -*- C++ -*-===// +//===- bolt/Profile/YAMLProfileWriter.cpp - YAML profile serializer -------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// -//===----------------------------------------------------------------------===// #include "bolt/Profile/YAMLProfileWriter.h" #include "bolt/Core/BinaryBasicBlock.h" diff --git a/bolt/lib/Rewrite/BinaryPassManager.cpp b/bolt/lib/Rewrite/BinaryPassManager.cpp index 216702419886..8937a30d6f53 100644 --- a/bolt/lib/Rewrite/BinaryPassManager.cpp +++ b/bolt/lib/Rewrite/BinaryPassManager.cpp @@ -1,12 +1,10 @@ -//===--- BinaryPassManager.cpp - Binary-level analysis/optimization passes ===// +//===- bolt/Rewrite/BinaryPassManager.cpp - Binary-level pass manager -----===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #include "bolt/Rewrite/BinaryPassManager.h" #include "bolt/Passes/ADRRelaxationPass.h" diff --git a/bolt/lib/Rewrite/BoltDiff.cpp b/bolt/lib/Rewrite/BoltDiff.cpp index cff3f450f508..f609a70558af 100644 --- a/bolt/lib/Rewrite/BoltDiff.cpp +++ b/bolt/lib/Rewrite/BoltDiff.cpp @@ -1,4 +1,4 @@ -//===--- BoltDiff.cpp -----------------------------------------------------===// +//===- bolt/Rewrite/BoltDiff.cpp ------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp index b411050d5e90..9dd58a26059d 100644 --- a/bolt/lib/Rewrite/DWARFRewriter.cpp +++ b/bolt/lib/Rewrite/DWARFRewriter.cpp @@ -1,12 +1,10 @@ -//===--- DWARFRewriter.cpp ------------------------------------------------===// +//===- bolt/Rewrite/DWARFRewriter.cpp -------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #include "bolt/Rewrite/DWARFRewriter.h" #include "bolt/Core/BinaryContext.h" diff --git a/bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp b/bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp index e77a88ac49db..c8f7aa0de3bd 100644 --- a/bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp +++ b/bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp @@ -1,12 +1,10 @@ -//===--- ExecutableFileMemoryManager.cpp ----------------------------------===// +//===- bolt/Rewrite/ExecutableFileMemoryManager.cpp -----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #include "bolt/Rewrite/ExecutableFileMemoryManager.h" #include "bolt/Rewrite/RewriteInstance.h" diff --git a/bolt/lib/Rewrite/MachORewriteInstance.cpp b/bolt/lib/Rewrite/MachORewriteInstance.cpp index c77c00ccb7bd..e04c22282104 100644 --- a/bolt/lib/Rewrite/MachORewriteInstance.cpp +++ b/bolt/lib/Rewrite/MachORewriteInstance.cpp @@ -1,12 +1,10 @@ -//===--- MachORewriteInstance.cpp - Instance of a rewriting process. ------===// +//===- bolt/Rewrite/MachORewriteInstance.cpp - MachO rewriter -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #include "bolt/Rewrite/MachORewriteInstance.h" #include "bolt/Core/BinaryContext.h" diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index aa57e2b7fe76..615743f40ea7 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -1,12 +1,10 @@ -//===--- RewriteInstance.cpp - Interface for machine-level function -------===// +//===- bolt/Rewrite/RewriteInstance.cpp - ELF rewriter --------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #include "bolt/Rewrite/RewriteInstance.h" #include "bolt/Core/BinaryContext.h" diff --git a/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp index 34050e51bd83..d5a50239b1a8 100644 --- a/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp +++ b/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp @@ -1,10 +1,14 @@ -//===------HugifyRuntimeLibrary.cpp - The Hugify Runtime Library ----------===// +//===- bolt/RuntimeLibs/HugifyRuntimeLibrary.cpp - Hugify RT Library ------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +// +// This file implements the HugifyRuntimeLibrary class. +// +//===----------------------------------------------------------------------===// #include "bolt/RuntimeLibs/HugifyRuntimeLibrary.h" #include "bolt/Core/BinaryFunction.h" diff --git a/bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp index 0a387526fdc2..db3195bcd122 100644 --- a/bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp +++ b/bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp @@ -1,4 +1,4 @@ -//= InstrumentationRuntimeLibrary.cpp - The Instrumentation Runtime Library =// +//===- bolt/RuntimeLibs/InstrumentationRuntimeLibrary.cpp -----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the InstrumentationRuntimeLibrary class. +// //===----------------------------------------------------------------------===// #include "bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h" diff --git a/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp index d9a4640aa21c..a697e42a7e53 100644 --- a/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp +++ b/bolt/lib/RuntimeLibs/RuntimeLibrary.cpp @@ -1,4 +1,4 @@ -//===--- RuntimeLibrary.cpp - The Runtime Library -------------------------===// +//===- bolt/RuntimeLibs/RuntimeLibrary.cpp - Runtime Library --------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// // +// This file implements the RuntimeLibrary class. +// //===----------------------------------------------------------------------===// #include "bolt/RuntimeLibs/RuntimeLibrary.h" diff --git a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp index c651f58aff6c..e46a0dbe58ab 100644 --- a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp +++ b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp @@ -1,4 +1,4 @@ -//===-- AArch64MCPlusBuilder.cpp - --------------------------*- C++ -*-===// +//===- bolt/Target/AArch64/AArch64MCPlusBuilder.cpp -----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// This file provides AArch64-specific MC+ builder. +// This file provides AArch64-specific MCPlus builder. // //===----------------------------------------------------------------------===// diff --git a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp index 3fa31a5c8955..25a8d5995ce1 100644 --- a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp +++ b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp @@ -1,4 +1,4 @@ -//===-- X86MCPlusBuilder.cpp ------------------------------------------===// +//===- bolt/Target/X86/X86MCPlusBuilder.cpp -------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// This file provides X86-specific MC+ builder. +// This file provides X86-specific MCPlus builder. // //===----------------------------------------------------------------------===// diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp index 5474e9f673a1..054b2d2b07da 100644 --- a/bolt/lib/Utils/CommandLineOpts.cpp +++ b/bolt/lib/Utils/CommandLineOpts.cpp @@ -1,4 +1,4 @@ -//===--- CommandLineOpts.cpp - BOLT CLI options ---------------------------===// +//===- bolt/Utils/CommandLineOpts.cpp - BOLT CLI options ------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/lib/Utils/Utils.cpp b/bolt/lib/Utils/Utils.cpp index 9abcfc46b24f..08d6d4abead3 100644 --- a/bolt/lib/Utils/Utils.cpp +++ b/bolt/lib/Utils/Utils.cpp @@ -1,4 +1,4 @@ -//===--- Utils.cpp - Common helper functions ------------------------------===// +//===- bolt/Utils/Utils.cpp - Common helper functions ---------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/runtime/common.h b/bolt/runtime/common.h index 19be0608495b..4e239abde9a3 100644 --- a/bolt/runtime/common.h +++ b/bolt/runtime/common.h @@ -1,12 +1,10 @@ -//===-- common.h ------------------------------------------------*- C++ -*-===// +//===- bolt/runtime/common.h ------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -//===----------------------------------------------------------------------===// #if !defined(__APPLE__) diff --git a/bolt/runtime/hugify.cpp b/bolt/runtime/hugify.cpp index 67abb9b733ab..056aa65e0eab 100644 --- a/bolt/runtime/hugify.cpp +++ b/bolt/runtime/hugify.cpp @@ -1,4 +1,4 @@ -//===-- hugify.cpp ----------------------------------------------*- C++ -*-===// +//===- bolt/runtime/hugify.cpp --------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/runtime/instr.cpp b/bolt/runtime/instr.cpp index 86fb772b15c2..164bd1a5c968 100644 --- a/bolt/runtime/instr.cpp +++ b/bolt/runtime/instr.cpp @@ -1,4 +1,4 @@ -//===-- instr.cpp -----------------------------------------------*- C++ -*-===// +//===- bolt/runtime/instr.cpp ---------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/tools/driver/llvm-bolt.cpp b/bolt/tools/driver/llvm-bolt.cpp index 1e44f9718861..30d6cf820ac1 100644 --- a/bolt/tools/driver/llvm-bolt.cpp +++ b/bolt/tools/driver/llvm-bolt.cpp @@ -1,4 +1,4 @@ -//===-- llvm-bolt.cpp - Feedback-directed layout optimizer ----------------===// +//===- bolt/tools/driver/llvm-bolt.cpp - Feedback-directed optimizer ------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/bolt/tools/merge-fdata/merge-fdata.cpp b/bolt/tools/merge-fdata/merge-fdata.cpp index 8e3668b5e202..c57834d06112 100644 --- a/bolt/tools/merge-fdata/merge-fdata.cpp +++ b/bolt/tools/merge-fdata/merge-fdata.cpp @@ -1,4 +1,4 @@ -//===-- merge-fdata.cpp - Tool for merging profile in fdata format --------===// +//===- bolt/tools/merge-fdata/merge-fdata.cpp -----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,9 @@ // //===----------------------------------------------------------------------===// // -// merge-fdata 1.fdata 2.fdata 3.fdata > merged.fdata +// Tool for merging profile in fdata format: +// +// $ merge-fdata 1.fdata 2.fdata 3.fdata > merged.fdata // //===----------------------------------------------------------------------===//