[BOLT] Replace uses of layout with basic block list
authorFabian Parzefall <parzefall@fb.com>
Thu, 14 Jul 2022 19:55:20 +0000 (12:55 -0700)
committerFabian Parzefall <parzefall@fb.com>
Thu, 14 Jul 2022 20:07:05 +0000 (13:07 -0700)
commitd55dfeaf32e8a88f0c6e7240fb2a8a1b57d89380
tree546371849a0631a53e0be6a947475e1907b28d37
parent3151b95dad408351e368baf31125985b6de4e5db
[BOLT] Replace uses of layout with basic block list

As we are moving towards support for multiple fragments, loops that
iterate over all basic blocks of a function, but do not depend on the
order of basic blocks in the final layout, should iterate over binary
functions directly, rather than the layout.

Eventually, all loops using the layout list should either iterate over
the function, or be aware of multiple layouts. This patch replaces
references to binary function's block layout with the binary function
itself where only little code changes are necessary.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D129585
bolt/include/bolt/Core/BinaryFunction.h
bolt/lib/Core/BinaryFunction.cpp
bolt/lib/Passes/ADRRelaxationPass.cpp
bolt/lib/Passes/Aligner.cpp
bolt/lib/Passes/BinaryPasses.cpp
bolt/lib/Passes/CacheMetrics.cpp
bolt/lib/Passes/IndirectCallPromotion.cpp
bolt/lib/Passes/Inliner.cpp
bolt/lib/Passes/PLTCall.cpp
bolt/lib/Passes/SplitFunctions.cpp
bolt/lib/Passes/ThreeWayBranch.cpp