This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Parents
  • Note: This was originally posted on 14th June 2010 at http://forums.arm.com

    Please try switch from -O0 to -O1, or -O2, and see if it remove the NOPs.


    Hi Joseph,

    Yep, even switching to -O1 did the trick.  NOPs are gone, plus a few other small things changed.

    Do you know why the lowest optimization level would have the NOPs?  They just seem so unnecessary & wasteful, I can't imagine why they're there even with optimization disabled.  It seems like the compiler went out of its way to put them there.  The output with -O1 (from a quick diff of the 2 generated assembly listings) is closer to what I'd have expected with optimization disabled.  It's almost like -O0 = "fluff up the code".

    Sorry, I don't expect/want you to apologize/defend/explain the compiler, I'm sure there are reasons, they're just not obvious to me.

    Thanks for your input on the issue, too.

    By the way, I'm going to install the latest version of the RVDS tools, maybe that alone will rectify the -O0 output... will post back.
Reply
  • Note: This was originally posted on 14th June 2010 at http://forums.arm.com

    Please try switch from -O0 to -O1, or -O2, and see if it remove the NOPs.


    Hi Joseph,

    Yep, even switching to -O1 did the trick.  NOPs are gone, plus a few other small things changed.

    Do you know why the lowest optimization level would have the NOPs?  They just seem so unnecessary & wasteful, I can't imagine why they're there even with optimization disabled.  It seems like the compiler went out of its way to put them there.  The output with -O1 (from a quick diff of the 2 generated assembly listings) is closer to what I'd have expected with optimization disabled.  It's almost like -O0 = "fluff up the code".

    Sorry, I don't expect/want you to apologize/defend/explain the compiler, I'm sure there are reasons, they're just not obvious to me.

    Thanks for your input on the issue, too.

    By the way, I'm going to install the latest version of the RVDS tools, maybe that alone will rectify the -O0 output... will post back.
Children
No data