Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6201753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:36:43+00:00 2026-05-24T04:36:43+00:00

Reading through the assembly GCC generates for C files in my project, I notice

  • 0

Reading through the assembly GCC generates for C files in my project, I notice functions are not outputted in assembly in the same order they appear in the source file. What is the goal of this reordering and what heuristics does GCC use to decide the order? (Is it just an artifact of the data structure holding functions?) This is not -freorder-functions, since I’m not using -fprofile-arcs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:36:44+00:00Added an answer on May 24, 2026 at 4:36 am

    The later parts of the inter-procedural optimisation phase use a bottom-up traversal of the call graph; that’s the ordering that you see. There’s a paper about the original design of this part of GCC here (from a while ago; this stuff first appeared in GCC 3.4).

    You can prevent the reordering using -fno-toplevel-reorder (or -fno-unit-at-a-time for less recent versions of GCC), but that disables some of the related optimisations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm reading through the Zend Framework coding standards , where they state that curly
Reading through the CKEditor documentation , I see that they have an option to
Reading through the Flickr API documentation it keeps stating I require an API key
Reading through this question on multi-threaded javascript, I was wondering if there would be
Reading through some of the questions here, the general concensus seems to be that
Reading through the SendAsync , BeginAsync method illustrations of Socket s, I realized that
Reading through documentation, I found following: 1.9.1 1.8.4 1.8.2 A version of 1.8.2 select
While reading through another question here, on creating a URL shortening service, it was
I'm reading through head first design patterns at the moment and while the book
I have been reading through the C++ FAQ and was curious about the friend

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.