Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kann mir jemand diese CFLAGS erklären?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
ConiKost
Developer
Developer


Joined: 11 Jan 2005
Posts: 1365

PostPosted: Mon Aug 28, 2006 3:41 pm    Post subject: Kann mir jemand diese CFLAGS erklären? Reply with quote

Hallo!
Ich habe von AMD diese CFLAGS bekommen :

Code:

"-fno-align-functions -fno-align-loops -fno-align-jumps  -fno-align-labels"


Kann mir jemand erklären, was diese bewirken? Im GCC Manual habe ich schon geschaut, aber ich peils nicht.
Back to top
View user's profile Send private message
nickless
n00b
n00b


Joined: 11 Dec 2005
Posts: 26

PostPosted: Mon Aug 28, 2006 4:18 pm    Post subject: Reply with quote

Dadurch werden die Funktionen/Schleifen/Jump- und Brach-Tabellen nicht an die 2^x-byte Grenzen ausgerichtet.
Dies sind Hardcore-Optimierungen und können unterschiedliche Programme etwas kleiner und schneller oder auch langsamer machen.

Wenn du nicht genau weißt wozu du sie haben willst, lass sie einfach weg, oder bench ein Paar Programme (gcc oder so) mit und ohne und entscheide dann was besser ist.
Back to top
View user's profile Send private message
ConiKost
Developer
Developer


Joined: 11 Jan 2005
Posts: 1365

PostPosted: Mon Aug 28, 2006 4:29 pm    Post subject: Reply with quote

Momentan ist mein gesamtes System durchkompiliert mit diesen CFLAGS ;)

Die CFLAGS sind eine Empfehlung seitens AMD ;) Nur darum hab ich die ...

Können die Sinn machen, weil die CPU wenig Cache hat?
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Mon Aug 28, 2006 7:02 pm    Post subject: Reply with quote

-> Diskussionsforum; keine Supportfrage.

Nicht unbedingt weil es wenig Cache ist.
Das ist eher davon abhängig wie die CPU intern arbeitet, z.B. den Cache neu füllt bei misses, ob es eine 8/16/32/64bit CPU ist, ob diese auf 'aligned access' hin optimiert ist oder nicht und wenn ja auf welchen Grenzen (2...32Byte meistens) etc.
Was sagt denn AMD wieso sie ausgerechnet so optimieren?
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Dr. Strangelove
Tux's lil' helper
Tux's lil' helper


Joined: 01 May 2006
Posts: 104
Location: Germania

PostPosted: Mon Sep 11, 2006 9:51 am    Post subject: Re: Kann mir jemand diese CFLAGS erklären? Reply with quote

ConiKost wrote:
Hallo!
Ich habe von AMD diese CFLAGS bekommen :

Code:

"-fno-align-functions -fno-align-loops -fno-align-jumps  -fno-align-labels"


Kann mir jemand erklären, was diese bewirken? Im GCC Manual habe ich schon geschaut, aber ich peils nicht.


Hier nochmal ein Link zu den gcc onlinedocs:
http://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/Optimize-Options.html#Optimize%20Options/

gcc onlinedocs wrote:
-Os
Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size.

-Os disables the following optimization flags:

-falign-functions -falign-jumps -falign-loops
-falign-labels -freorder-blocks -fprefetch-loop-arrays


Du benutzt quasi bis auf die letzten beiden Flags die -Os Optimierung.
Bei CPU's mit wenig Cache wird das oft vorgeschlagen.
_________________
Gentoo Linux ~amd64, Kernel 3.6-rc5, Enermax Pro82+ 425W, AMD Athlon 64 X2 BE-2400, Infineon PC800 8GB, ASUS M2NPV-VM, MSI 8600GTS DualHead, SSD OCZ Vertex2 60GB, HDD Samsung Spinpoint F1 320GB HD322HJ, ODD BENQ-DW1640, DVB-S TechniSat SkyStar2
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Mon Sep 11, 2006 10:03 am    Post subject: Re: Kann mir jemand diese CFLAGS erklären? Reply with quote

ConiKost wrote:
Hallo!
Ich habe von AMD diese CFLAGS bekommen :

Code:

"-fno-align-functions -fno-align-loops -fno-align-jumps  -fno-align-labels"




Wo hast Du die denn genau her?
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum