Revision history for GnuCompiler
Deletions:
Additions:
http://tigcc.ticalc.org/doc/comopts.html#SEC10
||-O||Optimierungsstuffe --> [[GccParameterCodeoptimierung Parameter für die Codeoptimierung]] ||
||-O||Optimierungsstuffe --> [[GccParameterCodeoptimierung Parameter für die Codeoptimierung]] ||
Deletions:
Additions:
- [[Build]]
- [[GnuProfiling Profiling]]
- [[http://www.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux Inline Assebler unter Linux]] auf den IBM-Seiten
- [[http://wap-pool.math.uni-bayreuth.de/prog/gcc_compiler.html Informationen zu GCC (gcc und g++) der Universität Bayreuth]]
- [[SseMitGcc SSE]]
- [[SseMitGcc SSE]]
- [[GnuProfiling Profiling]]
- [[http://www.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux Inline Assebler unter Linux]] auf den IBM-Seiten
- [[http://wap-pool.math.uni-bayreuth.de/prog/gcc_compiler.html Informationen zu GCC (gcc und g++) der Universität Bayreuth]]
- [[SseMitGcc SSE]]
- [[SseMitGcc SSE]]
Deletions:
~-[[GnuProfiling Profiling]]
~-[[SseMitGcc SEE mit GCC]] - Intels Erweiterung des Befehlssatzes für Parallelverarbeitung nutzen
~-[[http://www.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux Inline Assebler unter Linux]] auf den IBM-Seiten
~-[[http://wap-pool.math.uni-bayreuth.de/prog/gcc_compiler.html Informationen zu GCC (gcc und g++) der Universität Bayreuth]]
Additions:
- [[GccArchitectureSpecificOptions Architecture-Specific-Options]] (march, mcpu, mfpu)
- [[GccParameterCodeoptimierung Parameter für die Codeoptimierung]] (O1, O2, O3 ...)
- [[GccParameterCodeoptimierung Parameter für die Codeoptimierung]] (O1, O2, O3 ...)
Deletions:
==a==Parameter Codeoptimierung==a==
-O, -O1, -O2, -O3, -Os, -Og, -Ofast
https://wiki.gentoo.org/wiki/GCC_optimization
[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Optimize-Options.html#Optimize-Options Übersicht der Parameter für Codeoptimierung]]
Beispiele
http://www.tuleriit.ee/progs/rexample.php
%%-O3 -march=pentium3 -mfpmath=sse -funroll-loops -fomit-frame-pointer%%
Einsehen der vom GNU-Compiler unterstützten Optionen für die Zielmaschine (Target).
%%gcc --target-help%%
Hardware Models and Configurations
~-[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/AVR-Options.html#AVR-Options AVR Options]]
~-[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options Intel 386 and AMD x86-64 Options]]
Additions:
||-march=<Arch>||Native Code für eine bestimmten Prozessor generieren z.B. -march=pentium3 oder -march=armv6j ||
[[GccArchitectureSpecificOptions Architecture-Specific-Options]]
[[GccArchitectureSpecificOptions Architecture-Specific-Options]]
Deletions:
Additions:
-O, -O1, -O2, -O3, -Os, -Og, -Ofast
https://wiki.gentoo.org/wiki/GCC_optimization
[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Optimize-Options.html#Optimize-Options Übersicht der Parameter für Codeoptimierung]]
https://wiki.gentoo.org/wiki/GCC_optimization
[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Optimize-Options.html#Optimize-Options Übersicht der Parameter für Codeoptimierung]]
Deletions:
Additions:
||-O||Optimierungsstuffe http://tigcc.ticalc.org/doc/comopts.html#SEC10||
Additions:
[[pthreads]]: Bibliothek libpthread.so für Threads einbinden und alle c-Module zu einer Applikation linken.
Deletions:
Additions:
~-[[GnuProfiling Profiling]]
~-[[SseMitGcc SEE mit GCC]] - Intels Erweiterung des Befehlssatzes für Parallelverarbeitung nutzen
~-[[SseMitGcc SEE mit GCC]] - Intels Erweiterung des Befehlssatzes für Parallelverarbeitung nutzen
Deletions:
~-Intels Erweiterung des Befehlssatzes für Parallelverarbeitung nutzen - [[SseMitGcc SEE mit GCC]].
Additions:
==a==Relevante Themen==a==
~-[[Build]]
~-GnuProfiling
~-Intels Erweiterung des Befehlssatzes für Parallelverarbeitung nutzen - [[SseMitGcc SEE mit GCC]].
~-[[http://www.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux Inline Assebler unter Linux]] auf den IBM-Seiten
~-[[http://wap-pool.math.uni-bayreuth.de/prog/gcc_compiler.html Informationen zu GCC (gcc und g++) der Universität Bayreuth]]
~-[[Build]]
~-GnuProfiling
~-Intels Erweiterung des Befehlssatzes für Parallelverarbeitung nutzen - [[SseMitGcc SEE mit GCC]].
~-[[http://www.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux Inline Assebler unter Linux]] auf den IBM-Seiten
~-[[http://wap-pool.math.uni-bayreuth.de/prog/gcc_compiler.html Informationen zu GCC (gcc und g++) der Universität Bayreuth]]
Deletions:
Intels Erweiterung des Befehlssatzes für Parallelverarbeitung nutzen - [[SseMitGcc SEE mit GCC]].
[[http://wap-pool.math.uni-bayreuth.de/prog/gcc_compiler.html Informationen zu GCC (gcc und g++) der Universität Bayreuth]]
Deletions:
Additions:
||-fshort-enums||Kleineren Datentyp für enum, sonst immer integer||
||-fshort-double||Ersetze double durch float||
||-fshort-double||Ersetze double durch float||
Deletions:
Additions:
Bibliothek libpthread.so für Threads einbinden und alle c-Module zu einer Applikation linken.
gcc -shared -Wl,-soname,libtoll.so.1 -o libtoll.so.1.2.5 toll.o symtab.o -lc
gcc -shared -Wl,-soname,libtoll.so.1 -o libtoll.so.1.2.5 toll.o symtab.o -lc
Deletions:
Additions:
//...
#include <cstdio>
int main(int argc, char* argv[])
//...
#include <cstdio>
int main(int argc, char* argv[])
//...
Additions:
|=|Flag|=|Bedeutung||
Deletions:
Additions:
||-p||Erzeugt Profiling-Informationen für das Programm prof. ||
Deletions:
Deletions:
Additions:
==a==Grundlagen==a==
gcc -g -o myprog mainprog.o somefunctions.o -lpthreads -L/home/user1/libs
==a==Quellprogramme==a==
GNU-C++-Programm
==a==GCC-Parameter==a==
Ein Kompletter Überblick über die Optionen des GCC auf [[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Option-Summary.html#Option-Summary gcc.gnu.org]]
==a==Parameter Codeoptimierung==a==
[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Optimize-Options.html#Optimize-Options Übersicht der Parameter für Codeoptimierung]] - Was steckt hinter -O, -O1, -O2, -O3, -Os ?
Beispiele
%%-O3 -march=pentium3 -mfpmath=sse -funroll-loops -fomit-frame-pointer%%
Einsehen der vom GNU-Compiler unterstützten Optionen für die Zielmaschine (Target).
%%gcc --target-help%%
gcc -g -o myprog mainprog.o somefunctions.o -lpthreads -L/home/user1/libs
==a==Quellprogramme==a==
GNU-C++-Programm
==a==GCC-Parameter==a==
Ein Kompletter Überblick über die Optionen des GCC auf [[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Option-Summary.html#Option-Summary gcc.gnu.org]]
==a==Parameter Codeoptimierung==a==
[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Optimize-Options.html#Optimize-Options Übersicht der Parameter für Codeoptimierung]] - Was steckt hinter -O, -O1, -O2, -O3, -Os ?
Beispiele
%%-O3 -march=pentium3 -mfpmath=sse -funroll-loops -fomit-frame-pointer%%
Einsehen der vom GNU-Compiler unterstützten Optionen für die Zielmaschine (Target).
%%gcc --target-help%%
Deletions:
-mfpmath=unit
-mfpmath=unit
-mieee-fp
-mno-ieee-fp
i386 and x86-64 Options
==a==Codeoptimierung==a==
[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Optimize-Options.html#Optimize-Options Übersicht der Optionen]]
Andere Beispiele
%%gcc -O3 -march=pentium3 -mfpmath=sse -funroll-loops -fomit-frame-pointer -o gcc_macros gcc_macros.c%%
-mtune=cpu-type -march=cpu-type
-mfpmath=unit
-masm=dialect -mno-fancy-math-387
-mno-fp-ret-in-387 -msoft-float
-mno-wide-multiply -mrtd -malign-double
-mpreferred-stack-boundary=num -mcld -mcx16 -msahf -mrecip
-mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4
-msse4a -m3dnow -mpopcnt -mabm -msse5
-mthreads -mno-align-stringops -minline-all-stringops
-mpush-args -maccumulate-outgoing-args -m128bit-long-double
-m96bit-long-double -mregparm=num -msseregparm
-mveclibabi=type -mpc32 -mpc64 -mpc80 -mstackrealign
-momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs
-mcmodel=code-model
-m32 -m64 -mlarge-data-threshold=num
-mfused-madd -mno-fused-madd
http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Option-Summary.html#Option-Summary
Additions:
==a==Codeoptimierung==a==
[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Optimize-Options.html#Optimize-Options Übersicht der Optionen]]
Andere Beispiele
http://www.tuleriit.ee/progs/rexample.php
%%gcc -O3 -march=pentium3 -mfpmath=sse -funroll-loops -fomit-frame-pointer -o gcc_macros gcc_macros.c%%
[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Optimize-Options.html#Optimize-Options Übersicht der Optionen]]
Andere Beispiele
http://www.tuleriit.ee/progs/rexample.php
%%gcc -O3 -march=pentium3 -mfpmath=sse -funroll-loops -fomit-frame-pointer -o gcc_macros gcc_macros.c%%
Additions:
[[http://wap-pool.math.uni-bayreuth.de/prog/gcc_compiler.html Informationen zu GCC (gcc und g++) der Universität Bayreuth]]
Additions:
Intels Erweiterung des Befehlssatzes für Parallelverarbeitung nutzen - [[SseMitGcc SEE mit GCC]].
||Flag||Bedeutung||
||-c ||Nur Kompilieren; erzeugt Objekt-Dateien mit der Endung .o||
||-S ||Assemblercode erzeugen, um zu sehen was der Compiler eigentlich produziert.||
||-o <Datei>||Die Ausgabe in eine bestimmte Datei ausgeben||
||-funsigned-char -funsigned-char||Der Datentyp char wird als signed char bzw. unsigned char angenommen, wenn es eine Bedeutung in einem Programm spielt.||
||-w ||Alle Warnungen unterdrücken.||
||-Wall||Alle Warnungen ausgeben.||
||-g||Erzeugt Debuginformationen, je nachdemwas welcher Standarddebugger eingestellt ist.||
||-ggdb ||Erzeugt Debuginformationen für den [[GnuDebugger GDB]].||
||-gcoff -gxcoff||Erzeugt Debuginformationen im coff-Format bzw. xcoff-Format.||
|| || ||
||-p||Erzeugt Profiling-Informationen für das Programm prof. ||
||-pg||Erzeugt Profiling-Informationen für das Programm gprof.||
||-a||Erzeugt Profiling-Informationen um feststellen zu könne, wie häufig verschiedene Blöcke ausgeführt wurden.||
||-include||Eine Datei vorher bearbeiten, als würde Sie zum Projekt dazugehören.||
||-d<Label>||Ein Präprozessor-Label definieren.||
||-dM||Gibt alle #defines aus.||
||-l<Bibliothekenname> ||Linkeroption: Gibt an, welche [[LibraryPage Bibliothek]] eingebunden werden soll||
||-L<Verzeichis>||Weiterer Suchpfad für Bibliotheken||
||-b<Arch>||Für eine bestimmte Architektur kompilieren.||
||-fshort-enums||Für enum wird normallerweise int ||
||-mtune=<cpu-type>||athlon, .... [[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options Intel 386 and AMD x86-64 Options]]||
-mfpmath=unit
-mfpmath=unit
-mfpmath=unit
-mieee-fp
-mno-ieee-fp
i386 and x86-64 Options
-mtune=cpu-type -march=cpu-type
-mfpmath=unit
-masm=dialect -mno-fancy-math-387
-mno-fp-ret-in-387 -msoft-float
-mno-wide-multiply -mrtd -malign-double
-mpreferred-stack-boundary=num -mcld -mcx16 -msahf -mrecip
-mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4
-msse4a -m3dnow -mpopcnt -mabm -msse5
-mthreads -mno-align-stringops -minline-all-stringops
-mpush-args -maccumulate-outgoing-args -m128bit-long-double
-m96bit-long-double -mregparm=num -msseregparm
-mveclibabi=type -mpc32 -mpc64 -mpc80 -mstackrealign
-momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs
-mcmodel=code-model
-m32 -m64 -mlarge-data-threshold=num
-mfused-madd -mno-fused-madd
Hardware Models and Configurations
~-[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/AVR-Options.html#AVR-Options AVR Options]]
~-[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options Intel 386 and AMD x86-64 Options]]
http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Option-Summary.html#Option-Summary
||Flag||Bedeutung||
||-c ||Nur Kompilieren; erzeugt Objekt-Dateien mit der Endung .o||
||-S ||Assemblercode erzeugen, um zu sehen was der Compiler eigentlich produziert.||
||-o <Datei>||Die Ausgabe in eine bestimmte Datei ausgeben||
||-funsigned-char -funsigned-char||Der Datentyp char wird als signed char bzw. unsigned char angenommen, wenn es eine Bedeutung in einem Programm spielt.||
||-w ||Alle Warnungen unterdrücken.||
||-Wall||Alle Warnungen ausgeben.||
||-g||Erzeugt Debuginformationen, je nachdemwas welcher Standarddebugger eingestellt ist.||
||-ggdb ||Erzeugt Debuginformationen für den [[GnuDebugger GDB]].||
||-gcoff -gxcoff||Erzeugt Debuginformationen im coff-Format bzw. xcoff-Format.||
|| || ||
||-p||Erzeugt Profiling-Informationen für das Programm prof. ||
||-pg||Erzeugt Profiling-Informationen für das Programm gprof.||
||-a||Erzeugt Profiling-Informationen um feststellen zu könne, wie häufig verschiedene Blöcke ausgeführt wurden.||
||-include||Eine Datei vorher bearbeiten, als würde Sie zum Projekt dazugehören.||
||-d<Label>||Ein Präprozessor-Label definieren.||
||-dM||Gibt alle #defines aus.||
||-l<Bibliothekenname> ||Linkeroption: Gibt an, welche [[LibraryPage Bibliothek]] eingebunden werden soll||
||-L<Verzeichis>||Weiterer Suchpfad für Bibliotheken||
||-b<Arch>||Für eine bestimmte Architektur kompilieren.||
||-fshort-enums||Für enum wird normallerweise int ||
||-mtune=<cpu-type>||athlon, .... [[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options Intel 386 and AMD x86-64 Options]]||
-mfpmath=unit
-mfpmath=unit
-mfpmath=unit
-mieee-fp
-mno-ieee-fp
i386 and x86-64 Options
-mtune=cpu-type -march=cpu-type
-mfpmath=unit
-masm=dialect -mno-fancy-math-387
-mno-fp-ret-in-387 -msoft-float
-mno-wide-multiply -mrtd -malign-double
-mpreferred-stack-boundary=num -mcld -mcx16 -msahf -mrecip
-mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4
-msse4a -m3dnow -mpopcnt -mabm -msse5
-mthreads -mno-align-stringops -minline-all-stringops
-mpush-args -maccumulate-outgoing-args -m128bit-long-double
-m96bit-long-double -mregparm=num -msseregparm
-mveclibabi=type -mpc32 -mpc64 -mpc80 -mstackrealign
-momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs
-mcmodel=code-model
-m32 -m64 -mlarge-data-threshold=num
-mfused-madd -mno-fused-madd
Hardware Models and Configurations
~-[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/AVR-Options.html#AVR-Options AVR Options]]
~-[[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options Intel 386 and AMD x86-64 Options]]
http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Option-Summary.html#Option-Summary
Deletions:
Additions:
GNU-C-Programm
%%(c)
#include <stdio.h>
int main(int argc, char** argv)
{
return 0;
}
%%(c)
#include <stdio.h>
int main(int argc, char** argv)
{
return 0;
}
Additions:
Schöner [[http://www.linux-magazin.de/heft_abo/ausgaben/2003/08/vier_auf_einen_streich/(offset)/4 Artikel]], wie man [[SIMD SSE]] mit Inline-Assembler mit GCC nutzen kann.
Additions:
=====GNU-Compiler=====
GNU-C++-Compiler
GNU-C-Compiler
Bibliothek pthread einbinden und alle c-Module zu einer Applikation linken.
[[http://www.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux Inline Assebler unter Linux]] auf den IBM-Seiten
GNU-C++-Compiler
GNU-C-Compiler
Bibliothek pthread einbinden und alle c-Module zu einer Applikation linken.
[[http://www.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux Inline Assebler unter Linux]] auf den IBM-Seiten
Deletions:
Additions:
[[http://www.onlamp.com/pub/a/onlamp/2007/04/03/getting-familiar-with-gcc-parameters.html Getting familiar with gcc parameters]]