[BOLT] Add function layout class
authorFabian Parzefall <parzefall@fb.com>
Sun, 17 Jul 2022 00:23:21 +0000 (17:23 -0700)
committerFabian Parzefall <parzefall@fb.com>
Sun, 17 Jul 2022 00:23:24 +0000 (17:23 -0700)
commit8477bc67614a45d9bbd5caa407bb376069789c7b
tree9f61f156fb259ed70e2b10e67902ad3719cc117c
parentb7173553d723342d7790143e32dd5d0477941f69
[BOLT] Add function layout class

This patch adds a dedicated class to keep track of each function's
layout. It also lays the groundwork for splitting functions into
multiple fragments (as opposed to a strict hot/cold split).

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D129518
33 files changed:
bolt/include/bolt/Core/BinaryBasicBlock.h
bolt/include/bolt/Core/BinaryFunction.h
bolt/include/bolt/Core/FunctionLayout.h [new file with mode: 0644]
bolt/lib/Core/BinaryEmitter.cpp
bolt/lib/Core/BinaryFunction.cpp
bolt/lib/Core/CMakeLists.txt
bolt/lib/Core/DynoStats.cpp
bolt/lib/Core/Exceptions.cpp
bolt/lib/Core/FunctionLayout.cpp [new file with mode: 0644]
bolt/lib/Passes/Aligner.cpp
bolt/lib/Passes/AsmDump.cpp
bolt/lib/Passes/BinaryFunctionCallGraph.cpp
bolt/lib/Passes/BinaryPasses.cpp
bolt/lib/Passes/CacheMetrics.cpp
bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp
bolt/lib/Passes/FrameAnalysis.cpp
bolt/lib/Passes/IdenticalCodeFolding.cpp
bolt/lib/Passes/IndirectCallPromotion.cpp
bolt/lib/Passes/Inliner.cpp
bolt/lib/Passes/Instrumentation.cpp
bolt/lib/Passes/LongJmp.cpp
bolt/lib/Passes/LoopInversionPass.cpp
bolt/lib/Passes/ReorderAlgorithm.cpp
bolt/lib/Passes/ShrinkWrapping.cpp
bolt/lib/Passes/SplitFunctions.cpp
bolt/lib/Passes/StokeInfo.cpp
bolt/lib/Passes/TailDuplication.cpp
bolt/lib/Passes/ThreeWayBranch.cpp
bolt/lib/Passes/ValidateInternalCalls.cpp
bolt/lib/Profile/BoltAddressTranslation.cpp
bolt/lib/Profile/DataAggregator.cpp
bolt/lib/Profile/DataReader.cpp
bolt/lib/Rewrite/BoltDiff.cpp