Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


GCC compiler issue.

Now some code :
[code]
Void foo (data* dp)
{
If (dp->flags> F_NICE)
Return;
Int i = 0, j = 0, un
    ...
Return;
}
[/code]
Why is the compiler code is :
[code]
Push %ebp
Romov %esp, %ebp
Sub $ 0xc, %esp 4003rd Why not direct comparison can then decide whether to implement Yazhan?
...
Cmp. . .
Jne. . .
[/code]
I let the process according to how gcc compiler?
Needless to say this incorporates a compilation.


-->


1, gcc why, as you said earlier? I do not think any new compiler will do, it will have a destabilizing factor.

2, sub $ 0xc, %esp variables are allocated space not Yazhan

I used to write so much not yet seen any compilation of destabilizing factors.
In the above to do is to improve low-speed CPU, a more direct implementation of the order or directive have mixed impact on the efficiency of enforcement.
I just hope that the compiler can strictly according to the translation process, I only seem more senior the compiler controllable lower, they have to write the core module compilation ah.
I simply cite examples above, there is a more complicated reality, the variable initialization and distribution, so that they continue to re-completed the initial conditions, the effectiveness of such a great influence.

: Lol :

You write a compilation of so many? ?

Doubt it very much! If you really understand the compilation is not to ask such questions

Moreover, we can see that, you have not reached the level you said in the state

Compiler they have a fixed algorithm, you read that the compiler is doing so?

Of course, you can compile their own direct writing

You strive for perfection, you compile the compilation point to ponder, not point to ponder Series C

Hey, we want to provoke polemics that withheld me, a unity.

-->

Khan. . You did not come compiler optimization bars, or translation of the code should not be the case.

Unless a transfer function to be very frequent, such as may be necessary to add the option -fomit-frmae-pointer, no need to create / Stack withdrawal time frame. You unlikely that the function of the compiler :)

Have posted the above is not open optimization results.
Only the results of the optimization opened O1, O2, O3 is the same.

Lz stickers should compile a complete bar

Push %ebp
Romov %esp, %ebp

Calling it looks like these two functions is not your time to preserve the scene Yazhan Yazhan process variables. . . . . . . . . . . . . . . . . .
The third sentence is allocated stack space
Some did not have the key out. . . .

Since your landlord wants to be what you want compiler compiler code compilation, it had better direct compilation 算了. Compiler comply with the stipulated standards, it is translated into what kind of freedom.



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com