Priyanka Bose via llvm-dev
2018-Apr-09 05:33 UTC
[llvm-dev] Clang option for reordering sections in .text
Hi , 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? Regards, Priyanka -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180409/4e1dab3e/attachment.html>
Priyanka Bose via llvm-dev
2018-Apr-17 19:11 UTC
[llvm-dev] Clang option for reordering sections in .text
Hi, Any suggestions on this if there is any such flag available with clang. Regards Priyanka On Mon 9 Apr, 2018, 11:03 AM Priyanka Bose, <dolabose.21 at gmail.com> wrote:> Hi , > > 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? > > Regards, > Priyanka >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180417/fda57c40/attachment.html>
Joerg Sonnenberger via llvm-dev
2018-Apr-17 20:25 UTC
[llvm-dev] Clang option for reordering sections in .text
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