[llvm-dev] Clang option for reordering sections in .text

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 17 13:25:48 PDT 2018


On Mon, Apr 09, 2018 at 05:33:03AM +0000, Priyanka Bose via llvm-dev wrote:
> I would like to know if there is any way to reorder functions in the object
> file in order to improve code locality by implementing subsections
> .text.hot.
> GCC controls this behavior with '-f(no)-reorder-functions' flag, is there
> any way to do so in clang?

Source order has no real meaning. You can tag functions to go into a
specific section with the attributes.

Joerg


More information about the llvm-dev mailing list