compbench-devel Mailing List for CompBenchmarks (Page 17)
Brought to you by:
xfred
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(51) |
Nov
(66) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(242) |
Feb
(56) |
Mar
(95) |
Apr
(120) |
May
(127) |
Jun
(32) |
Jul
(10) |
Aug
(55) |
Sep
(114) |
Oct
(3) |
Nov
|
Dec
|
From: Frederic T. <xf...@us...> - 2007-04-16 20:37:31
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25546 Modified Files: Compiler-Option-Logic.cpp Log Message: Minor changes. Index: Compiler-Option-Logic.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Logic.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Compiler-Option-Logic.cpp 12 Apr 2007 19:55:37 -0000 1.2 --- Compiler-Option-Logic.cpp 16 Apr 2007 20:37:28 -0000 1.3 *************** *** 45,48 **** --- 45,49 ---- cmd->internalVarValue=A->Value(); } + commands.push_back(cmd); continue; *************** *** 75,79 **** } - #include <iostream> std::string CompilerOptionLogic::use(void) { --- 76,79 ---- *************** *** 102,108 **** if (!var) { ! C->colVarSet(varname, ! varvalue, ! description->Id()); } else { if (var->value!=varvalue) { --- 102,108 ---- if (!var) { ! C->colVarSet(varname, ! varvalue, ! description->Id()); } else { if (var->value!=varvalue) { |
From: Frederic T. <xf...@us...> - 2007-04-16 20:15:47
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17319 Modified Files: Compiler.cpp Compiler.h Log Message: Short-descriptions can be retrieved for a set of options (std::string). Index: Compiler.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Compiler.h 12 Apr 2007 19:55:37 -0000 1.11 --- Compiler.h 16 Apr 2007 20:15:44 -0000 1.12 *************** *** 120,124 **** virtual void colDestroy(void); - public: --- 120,123 ---- *************** *** 170,173 **** --- 169,173 ---- virtual std::string analyzeOptions(std::string _options); + virtual std::string shortHelpOptions(std::string _options); virtual int supportedVersionNumber(void); Index: Compiler.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Compiler.cpp 12 Apr 2007 19:55:37 -0000 1.11 --- Compiler.cpp 16 Apr 2007 20:15:44 -0000 1.12 *************** *** 232,243 **** int lastOk = 0; std::string tmp; while (o!="") { o=cbmSystem->Split(_options, " ", i++); ! if (o=="") ! break; times++; OD=OptionDescriptions(); D=OD->DescriptionLitteral(o); if (!D) { r+="Ignored option "; --- 232,249 ---- int lastOk = 0; std::string tmp; + std::string ck; while (o!="") { o=cbmSystem->Split(_options, " ", i++); ! if (o=="") { ! if ((!times) && (_options!="")) ! o=_options; ! else ! break; ! } times++; OD=OptionDescriptions(); D=OD->DescriptionLitteral(o); + if (!D) { r+="Ignored option "; *************** *** 251,256 **** r+="\n"; } ! if (lastOk) ! if (colOptionHas(D->Id())) { tmp="Option "; tmp+=o; --- 257,266 ---- r+="\n"; } ! if (lastOk) { ! if (D) ! ck=D->Id(); ! else ! ck=o; ! if (colOptionHas(ck)) { tmp="Option "; tmp+=o; *************** *** 259,264 **** r+="\n"; } else { ! colOptions.push_back(D->Id()); } } --- 269,275 ---- r+="\n"; } else { ! colOptions.push_back(ck); } + } } *************** *** 271,274 **** --- 282,319 ---- } + std::string Compiler::shortHelpOptions(std::string _options) + { + int i = 0; + std::string o = "!"; + CompilerOptionDescriptions *OD; + CompilerOptionDescription *D; + std::string r; + int times = 0; + + while (o!="") { + o=cbmSystem->Split(_options, " ", i++); + if (o=="") { + if ((!times) && (_options!="")) + o=_options; + else + break; + } + times++; + OD=OptionDescriptions(); + D=OD->DescriptionLitteral(o); + + r+=o; + r+=" : "; + if (!D) { + r+="not supported by libcompbenchmarks"; + } else { + r+=D->ShortDescription(); + } + r+="\n"; + } + + return(r); + } + void Compiler::supportedVersions(void) { |
From: Frederic T. <xf...@us...> - 2007-04-16 20:14:57
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv16935 Modified Files: cloptions.cpp Log Message: Compiler options can now also be described according to KB. Index: cloptions.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/cloptions.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** cloptions.cpp 20 Mar 2007 20:29:31 -0000 1.23 --- cloptions.cpp 16 Apr 2007 20:14:53 -0000 1.24 *************** *** 39,42 **** --- 39,43 ---- unsigned int compiler:1; unsigned int external_programs:1; + unsigned int option_analyze:1; } OptFilter; *************** *** 152,155 **** --- 153,187 ---- } + std::string cbmCompilerAnalyze(std::string _analyzeResult) + { + int i = 0; + std::string o = "!"; + std::string r; + int times = 0; + int ok = 0; + + while (o!="") { + o=cbmSystem->Split(_analyzeResult, "\n", i++); + if (o=="") { + if ((!times) && (_analyzeResult!="")) + o=_analyzeResult; + else + break; + } + times++; + + if (o=="1") + ok++; + else { + r+=" * "; + r+=o; + r+="\n"; + } + } + if (ok==times) + return(" * Ok"); + else + return(r); + } CBM::Package *cbmOptionsExpectPackage(char *optarg) *************** *** 207,210 **** --- 239,244 ---- std::string options; std::string tarball; + std::string options_analyzed; + std::string tmp; OptDomain domain = DomainUndef; /* help/query/{install/uninstall : manage ?}/bench/version/low-level */ *************** *** 228,231 **** --- 262,266 ---- {"installed", no_argument, 0, 'i'}, {"package", optional_argument, 0, 'p' }, + {"options-analyze", required_argument, 0, 'A'}, {"benchmark", optional_argument, 0, 'b' }, {"host", 0, 0, 'H' }, *************** *** 253,257 **** break; ! c = getopt_long (argc, argv, "hvxiI:F:U:qHc:p::B:b::aMmD:E:P:C:T:R:S:f", // uLHPCFIB", /* :011000112", */ long_options, &option_index); if (c==-1) { --- 288,292 ---- break; ! c = getopt_long (argc, argv, "hvxiI:F:U:qHc:p::B:b::A:aMmD:E:P:C:T:R:S:f", // uLHPCFIB", /* :011000112", */ long_options, &option_index); if (c==-1) { *************** *** 291,294 **** --- 326,334 ---- B=cbmOptionsExpectBenchmark(optarg); break; + case 'A': + filter.option_analyze=1; + if (optarg) + options_analyzed=optarg; + break; case 'D': action=ActionLLDownload; *************** *** 485,491 **** << "Binary : " << C->Binary() << std::endl; ! if (filter.all) { cbmShowOptionDescriptions(C); } parseExitValue=0; break; --- 525,548 ---- << "Binary : " << C->Binary() << std::endl; ! if ((!filter.option_analyze) && (filter.all)) { cbmShowOptionDescriptions(C); } + + if (filter.option_analyze) { + std::cout << std::endl + << "Descriptions from " << C->compiler() << ", branch " << C->relativeDescriptionDirectory() << std::endl + << "Option(s) analyzed : " << options_analyzed << std::endl; + + if (filter.all) { + std::cout << std::endl << "Option short descriptions :" << std::endl; + std::cout << C->shortHelpOptions(options_analyzed) << std::endl; + } else + std::cout << std::endl; + + std::cout << "Analyze : " << std::endl; + tmp=cbmCompilerAnalyze(C->analyzeOptions(options_analyzed)); + std::cout << tmp << std::endl; + } + parseExitValue=0; break; |
From: Frederic T. <xf...@us...> - 2007-04-16 18:23:45
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8104 Modified Files: System.cpp Log Message: CEL obsoleted. Logic is integrated within descriptions. Index: System.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** System.cpp 22 Mar 2007 19:17:29 -0000 1.11 --- System.cpp 16 Apr 2007 18:23:42 -0000 1.12 *************** *** 11,16 **** #include <Base/Config.h> #include <Base/md5.h> ! #include <CEL/CEL-Function.h> ! #include <CEL/CEL-Include.h> #include <Benchmark/Benchmark-DLLoader.h> --- 11,15 ---- #include <Base/Config.h> #include <Base/md5.h> ! #include <Compiler/Compiler-Option-Description.h> #include <Benchmark/Benchmark-DLLoader.h> *************** *** 38,42 **** { std::string tmp_bm; ! std::string tmp_cel; configurationFile=_filename; --- 37,41 ---- { std::string tmp_bm; ! std::string tmp_des; configurationFile=_filename; *************** *** 48,52 **** tmp_bm=PREFIX; ! tmp_cel=PREFIX; tmp_bm+="/lib"; --- 47,51 ---- tmp_bm=PREFIX; ! tmp_des=PREFIX; tmp_bm+="/lib"; *************** *** 56,65 **** CBM::cbmlib_paths.push_back("../../SupportedBenchmarks/.libs"); ! tmp_cel+="/share/KB"; ! CBM::CelIncludePathAdd(tmp_cel); ! CBM::CelIncludePathAdd("./libcompbenchmarks/share/KB"); ! CBM::CelIncludePathAdd("../libcompbenchmarks/share/KB"); ! CBM::CelIncludePathAdd("../../libcompbenchmarks/share/KB"); ! CBM::CelIncludePathAdd("../../../libcompbenchmarks/share/KB"); } --- 55,64 ---- CBM::cbmlib_paths.push_back("../../SupportedBenchmarks/.libs"); ! tmp_des+="/share/KB"; ! CBM::descriptionIncludePathAdd(tmp_des); ! CBM::descriptionIncludePathAdd("./libcompbenchmarks/share/KB"); ! CBM::descriptionIncludePathAdd("../libcompbenchmarks/share/KB"); ! CBM::descriptionIncludePathAdd("../../libcompbenchmarks/share/KB"); ! CBM::descriptionIncludePathAdd("../../../libcompbenchmarks/share/KB"); } *************** *** 572,577 **** } - CELFunctionDone(); - return(1); } --- 571,574 ---- |
From: Frederic T. <xf...@us...> - 2007-04-16 18:22:48
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++/3.0.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7708 Modified Files: description.xml Log Message: gxx/2.95.x/description.xml included. Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++/3.0.x/description.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** description.xml 4 Apr 2007 18:29:01 -0000 1.1 --- description.xml 16 Apr 2007 18:22:45 -0000 1.2 *************** *** 10,14 **** <options> ! <include description-path="gxx/3.0.x"/> ! <include description-path="gxx/2.95.x"/> </options> \ No newline at end of file --- 10,13 ---- <options> ! <include file="gxx/3.0.x/description.xml"/> </options> \ No newline at end of file |
From: Frederic T. <xf...@us...> - 2007-04-16 18:22:31
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gcc/3.0.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7694 Modified Files: description.xml Log Message: gxx/2.95.x/description.xml included. Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gcc/3.0.x/description.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** description.xml 4 Apr 2007 18:31:34 -0000 1.1 --- description.xml 16 Apr 2007 18:22:28 -0000 1.2 *************** *** 10,14 **** <options> ! <include description-path="gxx/3.0.x"/> ! <include description-path="gxx/2.95.x"/> </options> \ No newline at end of file --- 10,13 ---- <options> ! <include file="gxx/3.0.x/description.xml"/> </options> \ No newline at end of file |
From: Frederic T. <xf...@us...> - 2007-04-16 18:21:41
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gcc/2.95.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7306 Modified Files: description.xml Log Message: arch.xml included (not in gxx/2.95.x/description.xml anymore). Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gcc/2.95.x/description.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** description.xml 12 Apr 2007 16:50:57 -0000 1.2 --- description.xml 16 Apr 2007 18:21:38 -0000 1.3 *************** *** 11,13 **** --- 11,14 ---- <options> <include file="gxx/2.95.x/description.xml"/> + <include file="gxx/2.95.x/arch.xml"/> </options> \ No newline at end of file |
From: Frederic T. <xf...@us...> - 2007-04-16 18:21:24
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++/2.95.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6941 Modified Files: description.xml Log Message: arch.xml included (not in gxx/2.95.x/description.xml anymore). Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++/2.95.x/description.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** description.xml 12 Apr 2007 16:51:31 -0000 1.2 --- description.xml 16 Apr 2007 18:21:19 -0000 1.3 *************** *** 3,6 **** --- 3,7 ---- <options> <include file="gxx/2.95.x/description.xml"/> + <include file="gxx/2.95.x/arch.xml"/> <option id="elide-constructors"> |
From: Frederic T. <xf...@us...> - 2007-04-16 17:01:31
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8775 Modified Files: arch.xml description.xml mainopt.xml Log Message: Many updates. Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/description.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** description.xml 12 Apr 2007 16:50:36 -0000 1.3 --- description.xml 16 Apr 2007 17:01:26 -0000 1.4 *************** *** 13,17 **** <options> <include file="gxx/2.95.x/mainopt.xml"/> - <include file="gxx/2.95.x/arch.xml"/> <include file="gxx/2.95.x/cse.xml"/> <include file="gxx/2.95.x/inline.xml"/> --- 13,16 ---- Index: mainopt.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/mainopt.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mainopt.xml 12 Apr 2007 16:50:36 -0000 1.2 --- mainopt.xml 16 Apr 2007 17:01:27 -0000 1.3 *************** *** 40,44 **** <logic> <logic-option-exclusive on="kb-option-mainoptimization"/> ! <logic-flag-set id="alignment-disabled" value="1"/> </logic> </option> --- 40,44 ---- <logic> <logic-option-exclusive on="kb-option-mainoptimization"/> ! <logic-option-exclusive on="alignment-disabled" value="1"/> </logic> </option> *************** *** 75,79 **** <logic> <logic-option-exclusive on="kb-option-mainoptimization"/> ! <logic-flag-set id="alignment-disabled" value="0"/> </logic> </option> --- 75,79 ---- <logic> <logic-option-exclusive on="kb-option-mainoptimization"/> ! <logic-option-exclusive on="alignment-disabled" value="1"/> </logic> </option> *************** *** 91,94 **** --- 91,95 ---- <logic> <logic-option-exclusive on="kb-option-mainoptimization"/> + <logic-option-exclusive on="alignment-disabled" value="0"/> </logic> </option> *************** *** 103,106 **** --- 104,108 ---- <logic> <logic-option-exclusive on="kb-option-mainoptimization"/> + <logic-option-exclusive on="alignment-disabled" value="0"/> </logic> </option> Index: arch.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/arch.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** arch.xml 12 Apr 2007 16:50:36 -0000 1.2 --- arch.xml 16 Apr 2007 17:01:26 -0000 1.3 *************** *** 13,17 **** <options> ! <option id="m486"> <value>-m486</value> <short-description>Generate i486 optimized code</short-description> --- 13,17 ---- <options> ! <option id="mcpu-486"> <value>-m486</value> <short-description>Generate i486 optimized code</short-description> *************** *** 20,23 **** --- 20,26 ---- 386. Code generated for a 486 will run on a 386 and vice versa. </editor-description> + <logic> + <logic-option-exclusive on="kb-option-cpu"/> + </logic> </option> |
From: Frederic T. <xf...@us...> - 2007-04-16 17:00:28
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8732 Modified Files: Makefile.am Log Message: New files added. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 14 Mar 2007 19:28:30 -0000 1.2 --- Makefile.am 16 Apr 2007 17:00:22 -0000 1.3 *************** *** 17,21 **** --- 17,23 ---- sources = Compiler.cpp \ + Compiler-Version.cpp \ Compiler-Option-Description.cpp \ + Compiler-Option-Logic.cpp \ Compiler-Options.cpp \ Compiler-OptionSet.cpp |
From: Frederic T. <xf...@us...> - 2007-04-16 16:53:50
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6136 Modified Files: Compiler-Option-Description.cpp Compiler-Option-Description.h Log Message: Two-pass compilations detected (e.g for -fuse-profile and related options). Index: Compiler-Option-Description.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Compiler-Option-Description.cpp 12 Apr 2007 19:55:37 -0000 1.6 --- Compiler-Option-Description.cpp 16 Apr 2007 16:53:47 -0000 1.7 *************** *** 44,54 **** CompilerOptionDescriptions *_parent) { ! int i; ! int n = _from->nodeNumber(); ! CBM::XMLNode *N; ! CBM::XMLAttribute *A; logic=0; parent=_parent; A=_from->getAttribute("id"); if (A) --- 44,60 ---- CompilerOptionDescriptions *_parent) { ! int i; ! int n = _from->nodeNumber(); ! CBM::XMLNode *N; ! CBM::XMLAttribute *A; ! CompilerOptionDescription *D; logic=0; parent=_parent; + twoPassNeeded=0; + firstPass=0; + secondPass=0; + firstPassOption=""; + A=_from->getAttribute("id"); if (A) *************** *** 61,66 **** if (N->Name() == "short-description") shortDescription=N->Value(); ! if (N->Name() == "editor-description") ! editorDescription=N->Value(); if (N->Name() == "logic") { logic=new CBM::CompilerOptionLogic(_parent, --- 67,82 ---- if (N->Name() == "short-description") shortDescription=N->Value(); ! if (N->Name() == "editor-description") { ! A=N->getAttribute("copy-id"); ! if (!A) ! editorDescription=N->Value(); ! else { ! D=_parent->Description(A->Value()); ! if (D) ! editorDescription=D->EditorDescription(); ! else ! editorDescription=""; ! } ! } if (N->Name() == "logic") { logic=new CBM::CompilerOptionLogic(_parent, *************** *** 68,71 **** --- 84,106 ---- N); } + + if (N->Name() == "compilation") { + A=N->getAttribute("type"); + if (A) { + if (A->Value()=="first-pass") { + twoPassNeeded=1; + firstPass=1; + } + if (A->Value()=="second-pass") { + A=N->getAttribute("first-pass"); + if (A) { + twoPassNeeded=1; + secondPass=1; + + firstPassOption=A->Value(); + } + } + } + } } } *************** *** 91,94 **** --- 126,152 ---- } + int CompilerOptionDescription::CompilationTwoPassNeeded(void) + { + return(twoPassNeeded); + } + + int CompilerOptionDescription::CompilationPass(void) + { + if (CompilationTwoPassNeeded()) { + if (firstPass) + return(1); + + if (secondPass) + return(2); + } + return(0); + } + + std::string CompilerOptionDescription::CompilationFirstPassOption(void) + { + return(firstPassOption); + } + + std::string CompilerOptionDescription::Use(void) { Index: Compiler-Option-Description.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Compiler-Option-Description.h 12 Apr 2007 19:55:37 -0000 1.6 --- Compiler-Option-Description.h 16 Apr 2007 16:53:47 -0000 1.7 *************** *** 56,59 **** --- 56,64 ---- std::string option; + int twoPassNeeded; + int firstPass; + int secondPass; + std::string firstPassOption; + CBM_CODs *parent; CBM_COL *logic; *************** *** 84,87 **** --- 89,97 ---- virtual std::string Option(void); + virtual int CompilationTwoPassNeeded(void); + virtual int CompilationPass(void); + virtual std::string CompilationFirstPassOption(void); + + virtual std::string Use(void); |
From: Frederic T. <xf...@us...> - 2007-04-16 16:53:27
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/3.0.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5805 Modified Files: description.xml Log Message: Profile related options added. Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/3.0.x/description.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** description.xml 9 Apr 2007 10:12:06 -0000 1.2 --- description.xml 16 Apr 2007 16:53:05 -0000 1.3 *************** *** 13,16 **** --- 13,18 ---- <options> + <include file="gxx/2.95.x/description.xml"/> + <option id="ssa"> <value>-fssa</value> *************** *** 24,30 **** According to -fdce description, this is probably an experimental feature. </editor-description> </option> ! <option id="fdce"> <value>-fdce</value> <short-description>Dead-code elimination in SSA form</short-description> --- 26,36 ---- According to -fdce description, this is probably an experimental feature. </editor-description> + <logic> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> </option> ! <option id="dce"> <value>-fdce</value> <short-description>Dead-code elimination in SSA form</short-description> *************** *** 33,36 **** --- 39,47 ---- -fssa, this is an experimental feature. </editor-description> + <logic> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + <logic-option-requires id="ssa"/> + </logic> </option> *************** *** 53,56 **** --- 64,71 ---- If n is not specified, use a machine-dependent default. </editor-description> + <logic> + <logic-option-exclusive on="alignment-disabled" value="1"/> + <logic-option-implied-by id="Os"/> + </logic> </option> *************** *** 73,76 **** --- 88,96 ---- If n is not specified, use a machine-dependent default. </editor-description> + <logic> + <logic-option-exclusive on="alignment-disabled" value="0"/> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> </option> *************** *** 90,93 **** --- 110,117 ---- very likely to be 1, meaning no alignment. </editor-description> + <logic> + <logic-option-exclusive on="alignment-disabled" value="1"/> + <logic-option-implied-by id="Os"/> + </logic> </option> *************** *** 107,110 **** --- 131,139 ---- very likely to be 1, meaning no alignment. </editor-description> + <logic> + <logic-option-exclusive on="alignment-disabled" value="0"/> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> </option> *************** *** 120,123 **** --- 149,156 ---- If n is not specified, use a machine-dependent default. </editor-description> + <logic> + <logic-option-exclusive on="alignment-disabled" value="1"/> + <logic-option-implied-by id="Os"/> + </logic> </option> *************** *** 133,136 **** --- 166,174 ---- If n is not specified, use a machine-dependent default. </editor-description> + <logic> + <logic-option-exclusive on="alignment-disabled" value="0"/> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> </option> *************** *** 146,149 **** --- 184,397 ---- If n is not specified, use a machine-dependent default. </editor-description> + <logic> + <logic-option-exclusive on="alignment-disabled" value="1"/> + <logic-option-implied-by id="Os"/> + </logic> + </option> + + <option id="align-jumps"> + <value>-falign-jumps</value> + <short-description>Enable target branch default alignment</short-description> + <editor-description> + Align branch targets to a power-of-two boundary, for branch targets + where the targets can only be reached by jumping, skipping up to n + bytes like -falign-functions. In this case, no dummy operations + need be executed. + + If n is not specified, use a machine-dependent default. + </editor-description> + <logic> + <logic-option-exclusive on="alignment-disabled" value="0"/> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> + </option> + + <!-- !!! missing --> + + <option id="reduce-all-givs"> + <value>-freduce-all-givs</value> + <short-description>Forces all general-induction variables in loops to be strength-reduced.</short-description> + <editor-description> + Forces all general-induction variables in loops to be strength- + reduced. + + Note: When compiling programs written in Fortran, -fmove-all-movables + and -freduce-all-givs are enabled by default when you use the + optimizer. + + These options may generate better or worse code; results are highly + dependent on the structure of loops within the source code. + + These two options are intended to be removed someday, once they + have helped determine the efficacy of various approaches to + improving loop optimizations. + + Please let us (gc...@gc... and fo...@gn...) know how + use of these options affects the performance of your production + code. We're very interested in code that runs slower when these + options are enabled. + </editor-description> + <logic> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> + </option> + + <option id="strict-aliasing"> + <value>-fstrict-aliasing</value> + <short-description>Assume the strictest aliasing rules to be applicable</short-description> + <editor-description> + Allows the compiler to assume the strictest aliasing rules + applicable to the language being compiled. For C (and C++), this + activates optimizations based on the type of expressions. In + particular, an object of one type is assumed never to reside at the same + address as an object of a different type, unless the types are + almost the same. For example, an "unsigned int" can alias an + "int", but not a "void*" or a "double". A character type may alias + any other type. + </editor-description> + <logic> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> + </option> + + <option id="gcse"> + <value>-fgcse</value> + <short-description>Global common subexpression elimination pass</short-description> + <editor-description> + Perform a global common subexpression elimination pass. This pass + also performs global constant and copy propagation. + </editor-description> + <logic> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> + </option> + + <option id="rename-registers"> + <value>-frename-registers</value> + <short-description>Attempt to avoid false dependencies in scheduled code</short-description> + <editor-description> + Attempt to avoid false dependencies in scheduled code by making use + of registers left over after register allocation. This optimization + will most benefit processors with lots of registers. It can, + however, make debugging impossible, since variables will no longer + stay in a ``home register''. + </editor-description> + <logic> + <logic-option-implied-by id="O2"/> + <logic-option-implied-by id="O3"/> + </logic> + </option> + + <option id="mcpu-486"> + <value>-mcpu=i486</value> + <short-description>486 Optimizations</short-description> + <editor-description> + Assume the defaults for the machine type cpu-type when scheduling + instructions. The choices for cpu-type are i386, i486, i586, i686, + pentium, pentiumpro, k6, and athlon + + While picking a specific cpu-type will schedule things appropri- + ately for that particular chip, the compiler will not generate any + code that does not run on the i386 without the -march=cpu-type + option being used. i586 is equivalent to pentium and i686 is + equivalent to pentiumpro. k6 is the AMD chip as opposed to the + Intel ones. + </editor-description> + <logic> + <logic-option-exclusive on="kb-option-cpu"/> + </logic> + </option> + + <option id="mcpu-pentium"> + <value>-mcpu=pentium</value> + <short-description>Pentium optimizations</short-description> + <editor-description copy-id="mcpu-486"/> + <logic> + <logic-option-exclusive on="kb-option-cpu"/> + </logic> + </option> + + <option id="mcpu-pentiumpro"> + <value>-mcpu=pentiumpro</value> + <short-description>Pentium Pro optimizations</short-description> + <editor-description copy-id="mcpu-486"/> + <logic> + <logic-option-exclusive on="kb-option-cpu"/> + </logic> + </option> + + <option id="mcpu-k6"> + <value>-mcpu=k6</value> + <short-description>AMD K6 optimizations</short-description> + <editor-description copy-id="mcpu-486"/> + <logic> + <logic-option-exclusive on="kb-option-cpu"/> + </logic> + </option> + + <option id="profile-generate"> + <value>-fprofile-arcs</value> + <compilation type="first-pass"/> + <short-description>Instrument arcs during compilation</short-description> + <editor-description> + Here's GCC 3.1.x help (3.0.x's not given) : + + Instrument arcs during compilation to generate coverage data or for + profile-directed block ordering. During execution the program + records how many times each branch is executed and how many times + it is taken. When the compiled program exits it saves this data to + a file called sourcename.da for each source file. + + For profile-directed block ordering, compile the program with + -fprofile-arcs plus optimization and code generation options, generate + the arc profile information by running the program on a + selected workload, and then compile the program again with the same + optimization and code generation options plus -fbranch-probabilities. + + The other use of -fprofile-arcs is for use with "gcov", when it is + used with the -ftest-coverage option. GCC supports two methods of + determining code coverage: the options that support "gcov", and + options -a and -ax, which write information to text files. The + options that support "gcov" do not need to instrument every arc in + the program, so a program compiled with them runs faster than a + program compiled with -a, which adds instrumentation code to every + basic block in the program. The tradeoff: since "gcov" does not + have execution counts for all branches, it must start with the execution + counts for the instrumented branches, and then iterate over + the program flow graph until the entire graph has been solved. + Hence, "gcov" runs a little more slowly than a program which uses + information from -a and -ax. + + With -fprofile-arcs, for each function of your program GCC creates + a program flow graph, then finds a spanning tree for the graph. + Only arcs that are not on the spanning tree have to be instrumented: + the compiler adds code to count the number of times that + these arcs are executed. When an arc is the only exit or only + entrance to a block, the instrumentation code can be added to the + block; otherwise, a new basic block must be created to hold the + instrumentation code. + + This option makes it possible to estimate branch probabilities and + to calculate basic block execution counts. In general, basic block + execution counts as provided by -a do not give enough information + to estimate all branch probabilities. + </editor-description> + <logic/> + </option> + + <option id="profile-use"> + <value>-fbranch-probabilities</value> + <compilation type="second-pass" first-pass="profile-generate"/> + <short-description>Optimizations based on path guessing</short-description> + <editor-description> + After running a program compiled with -fprofile-arcs, you can compile it a + second time using -fbranch-probabilities, to improve + optimizations based on guessing the path a branch might take. + </editor-description> + <logic/> </option> |
From: Frederic T. <xf...@us...> - 2007-04-15 18:14:26
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6384 Modified Files: compilers.pl Log Message: Updated 3.0.x options. Index: compilers.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib/compilers.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** compilers.pl 12 Apr 2007 19:57:06 -0000 1.3 --- compilers.pl 15 Apr 2007 18:14:21 -0000 1.4 *************** *** 124,127 **** --- 124,131 ---- 'align-jumps' => ['option-want alignment-disabled 0', 'implied-by O2 O3'], + 'reduce-all-givs' => ['implied-by O2 O3'], + 'strict-aliasing' => ['implied-by O2 O3'], + 'gcse' => ['implied-by O2 O3'], + 'rename-registers' => ['implied-by O2 O3'] ); |
From: Frederic T. <xf...@us...> - 2007-04-12 19:59:31
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15763 Modified Files: 00-XML.pl Log Message: New test on getAttribute(); (prevent regression). Index: 00-XML.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/00-XML.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 00-XML.pl 25 Jan 2007 16:58:07 -0000 1.6 --- 00-XML.pl 12 Apr 2007 19:59:28 -0000 1.7 *************** *** 6,10 **** require "libtest.pl"; ! use Test::Simple tests => 44; my $sys; --- 6,10 ---- require "libtest.pl"; ! use Test::Simple tests => 45; my $sys; *************** *** 102,105 **** --- 102,107 ---- test_attribute($root->getAttribute(0), "att0", ""); test_attribute($root->getAttribute("att0"), "att0", ""); + + ok(!defined($root->getAttribute("att0XY-notdef")), "regression : checking if NULL is returned on non-existing attributes"); } |
From: Frederic T. <xf...@us...> - 2007-04-12 19:59:02
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15406 Modified Files: XML.cpp Log Message: Fix in getAttribute(); Index: XML.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/XML.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** XML.cpp 25 Jan 2007 16:57:09 -0000 1.6 --- XML.cpp 12 Apr 2007 19:58:58 -0000 1.7 *************** *** 163,167 **** } ! return(A); } --- 163,167 ---- } ! return(0); } |
From: Frederic T. <xf...@us...> - 2007-04-12 19:58:49
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15384 Removed Files: 05-KB-Options.pl 05-Option-Descriptions.pl Log Message: CEL obsoleted. Logic is integrated within descriptions. (Renamed file). --- 05-KB-Options.pl DELETED --- --- 05-Option-Descriptions.pl DELETED --- |
From: Frederic T. <xf...@us...> - 2007-04-12 19:58:08
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15061 Added Files: 05-KB-Option-Descriptions.pl 05-KB-Option-Logics.pl Log Message: CEL obsoleted. Logic is integrated within descriptions. (Renamed file). --- NEW FILE: 05-KB-Option-Descriptions.pl --- #!/usr/bin/perl -w -I .. # ----------------------------------------------------------------------------- # $Id: 05-KB-Option-Descriptions.pl,v 1.1 2007/04/12 19:58:04 xfred Exp $ # # This is free software. # For details, see the GNU Public License in the COPYING file, or # Look http://www.fsf.org # ----------------------------------------------------------------------------- use strict; use CBM; my $sys; push(@INC, "lib"); require "libtest.pl"; require "compilers.pl"; our %COMPILER_FAKE_INTERFACES; our @COMPILER_FAKE_INTERFACES; our %COMPILER_FAKE_OPTIONS; use Test::More; sub plan_count_tests { my $n = 0; my $c; foreach $c (@COMPILER_FAKE_INTERFACES) { my $expect = compiler_option_number_expected($COMPILER_FAKE_INTERFACES{$c}); $n+=(3+($expect*6)); } return($n); } plan tests => (plan_count_tests()); our $top_srcdir; my $T; my $F; sub test_options_descriptions { my $OD = shift; my $compiler = shift; my $n; $n=$OD->DescriptionNumber(); my $expect = compiler_option_number_expected($compiler); ok($n eq $expect, "$compiler: DescriptionNumber() returns $expect (has $n in " . $OD->DescriptionFile() . ")"); my $i; my %unique_id; my %unique_opt; my $c = (split('-', $compiler))[0]; $c=~ s/g\+\+/gxx/; my $D; for($i=0; $i<$n; $i++) { $D = $OD->Description($i); ok($D->Id() ne "", "$compiler: D$i has identifier"); $unique_id{$D->Id()}++; ok($D->ShortDescription() ne "", "$compiler: D$i has short description"); ok($D->EditorDescription() ne "", "$compiler: D$i has editor's description"); ok($D->Option() ne "", "$compiler: D$i has option (value)"); $unique_id{$D->Option()}++; # !!! # my $fid = "kb-$c-option-" . $D->Id() . "-is-compatible"; # ok(defined(CBM::celFunctionGet($fid)), "$fid defined"); } foreach(keys %unique_id) { ok($unique_id{$_} == 1, "$compiler: option $_ is defined only once"); } foreach(keys %unique_opt) { ok($unique_opt{$_} == 1, "$compiler: value $_ is defined only once"); } } sub test_compilers { my $fake; my $CS = CBM::CompilerSelector->new($sys); foreach(@COMPILER_FAKE_INTERFACES) { $fake="$top_srcdir/reference/$_"; ok(-x $fake, "$fake is an executable"); my $C = $CS->select("$fake"); ok(defined($C)); test_options_descriptions($C->OptionDescriptions(), $COMPILER_FAKE_INTERFACES{$_}); } } $sys = CBM::Init(); test_compilers(); $sys->done(); --- NEW FILE: 05-KB-Option-Logics.pl --- #!/usr/bin/perl -w -I .. use strict; use CBM; my $sys; push(@INC, "lib"); require "libtest.pl"; require "compilers.pl"; our $top_srcdir; our %COMPILER_FAKE_INTERFACES; our @COMPILER_FAKE_INTERFACES; our %COMPILER_FAKE_OPTIONS; use Test::More; sub count_tests_fake_compiler_branches { return((@COMPILER_FAKE_INTERFACES+0)); } sub count_tests_fake_compiler_option_using_vars { my $fake_c; my $c_branch; my $count = 0; foreach $fake_c (@COMPILER_FAKE_INTERFACES) { my %set_variable_count; my $option_set; $c_branch=$COMPILER_FAKE_INTERFACES{$fake_c}; $option_set=$COMPILER_FAKE_OPTIONS{$c_branch}; my $opt; foreach $opt (keys %{$option_set}) { my @operations = @{$option_set->{$opt}}; my $o; foreach $o (@operations) { if ($o =~ /^option-exclusive (.+)/) { $set_variable_count{$1}++; } } } foreach(keys %set_variable_count) { my $c = $set_variable_count{$_}; if ($c>1) { $count+=($c*($c-1))/2; } else { $count++; } } } return($count); } sub count_tests_fake_compiler_option_implied_bys { my $fake_c; my $c_branch; my $option_set; my $count = 0; foreach $fake_c (@COMPILER_FAKE_INTERFACES) { my %implied_count; $c_branch=$COMPILER_FAKE_INTERFACES{$fake_c}; $option_set=$COMPILER_FAKE_OPTIONS{$c_branch}; my $opt; foreach $opt (keys %{$option_set}) { my @operations = @{$option_set->{$opt}}; my $o; foreach $o (@operations) { if ($o =~ /^implied-by (.+)/) { my @ib = split(' ', $1); my $ib; foreach $ib (@ib) { $implied_count{$ib}++; } } } } foreach(keys %implied_count) { my $c = $implied_count{$_}; $count+=($c+1); } } return($count); } sub test_compilers { my $CS = new CBM::CompilerSelector($sys); foreach(@COMPILER_FAKE_INTERFACES) { my $fake_c = "$top_srcdir/reference/$_"; ok(-x $fake_c, "$fake_c is executable"); my $C = $CS->select($fake_c); ok(defined($C), "CBM::Compiler instance can be retrieved for $fake_c"); } } sub test_option_using_vars { my $fake_c; my $c_branch; my $option_set; my $opt; foreach $fake_c (@COMPILER_FAKE_INTERFACES) { $c_branch=$COMPILER_FAKE_INTERFACES{$fake_c}; $option_set=$COMPILER_FAKE_OPTIONS{$c_branch}; my %set_variable_options; foreach $opt (keys %{$option_set}) { my @operations = @{$option_set->{$opt}}; my $o; foreach $o (@operations) { if ($o =~ /^option-exclusive (.+)/) { push(@{$set_variable_options{$1}}, $opt); } } } my $CS = new CBM::CompilerSelector($sys); my $fake_cmd = "$top_srcdir/reference/$fake_c"; my $C = $CS->select($fake_cmd); my $var; foreach $var (keys %set_variable_options) { my $i; my $j; my $n = (@{$set_variable_options{$var}})+0; for($i=0;$i<$n;$i++) { if ($n==1) { ok(0, "$opt is the only option to use exclusive variable $var"); } for($j=$i+1;$j<$n;$j++) { my $l0 = compiler_option_litteral($C, $set_variable_options{$var}[$i]); my $l1 = compiler_option_litteral($C, $set_variable_options{$var}[$j]); my $opt_string = "$l0 $l1"; my $r = $C->analyzeOptions($opt_string); my $x = "1\nOption $l1 is incompatible with $l0\n"; ok($r eq $x, "Analyzing $opt_string on " . $C->Name() . " : expects ($x) has ($r)\n"); } } } } } sub test_option_implied_bys { my $fake_c; my $c_branch; my $option_set; my $opt; foreach $fake_c (@COMPILER_FAKE_INTERFACES) { $c_branch=$COMPILER_FAKE_INTERFACES{$fake_c}; $option_set=$COMPILER_FAKE_OPTIONS{$c_branch}; my %implied_by; foreach $opt (keys %{$option_set}) { my @operations = @{$option_set->{$opt}}; my $o; foreach $o (@operations) { if ($o =~ /^implied-by (.+)/) { my @ib = split(' ', $1); my $ib; foreach $ib (@ib) { push(@{$implied_by{$ib}}, $opt); } } } } my $CS = new CBM::CompilerSelector($sys); my $fake_cmd = "$top_srcdir/reference/$fake_c"; my $C = $CS->select($fake_cmd); my $i; foreach $i (keys %implied_by) { my $l0 = compiler_option_litteral($C, $i); my $opt_string = "$l0"; my $r = $C->analyzeOptions($opt_string); my $x = "1\n"; ok($r eq $x, "Analyzing $opt_string on " . $C->Name() . " : expects ($x) has ($r)\n"); } foreach $i (keys %implied_by) { my @ib = @{$implied_by{$i}}; my $ib; foreach $ib (@ib) { my $l0 = compiler_option_litteral($C, $i); my $l1 = compiler_option_litteral($C, $ib); my $opt_string = "$l0 $l1"; my $r = $C->analyzeOptions($opt_string); my $x = "1\nOption $l1 is implied by $l0\n"; ok($r eq $x, "Analyzing $opt_string on " . $C->Name() . " : expects ($x) has ($r)\n"); } } } } plan tests => (count_tests_fake_compiler_branches()*2+ count_tests_fake_compiler_option_using_vars()+ count_tests_fake_compiler_option_implied_bys()); $sys = CBM::Init(); test_compilers(); test_option_using_vars(); test_option_implied_bys(); $sys->done(); |
From: Frederic T. <xf...@us...> - 2007-04-12 19:57:09
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14868 Modified Files: compilers.pl Log Message: New descriptions for gcc/g++ 3.0.x branch. Index: compilers.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib/compilers.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** compilers.pl 11 Apr 2007 20:30:18 -0000 1.2 --- compilers.pl 12 Apr 2007 19:57:06 -0000 1.3 *************** *** 39,43 **** #'compiler-fake-gcc-4.1.1-13' => 'gcc-3.0.x', 'compiler-fake-gcc-2.95.3' => 'gcc-2.95.x', ! # 'compiler-fake-g++-2.95.3' => 'g++-2.95.x' ); --- 39,45 ---- #'compiler-fake-gcc-4.1.1-13' => 'gcc-3.0.x', 'compiler-fake-gcc-2.95.3' => 'gcc-2.95.x', ! 'compiler-fake-g++-2.95.3' => 'g++-2.95.x', ! 'compiler-fake-gcc-3.0.4' => 'gcc-3.0.x', ! 'compiler-fake-g++-3.0.4' => 'g++-3.0.x' ); *************** *** 45,49 **** # our @COMPILER_FAKE_INTERFACES = ('compiler-fake-gcc-2.95.3', ! # 'compiler-fake-g++-2.95.3' ); --- 47,53 ---- # our @COMPILER_FAKE_INTERFACES = ('compiler-fake-gcc-2.95.3', ! 'compiler-fake-g++-2.95.3', ! 'compiler-fake-gcc-3.0.4', ! 'compiler-fake-g++-3.0.4' ); *************** *** 61,69 **** my %COMPILER_FAKE_OPTIONS_GXX_295x = ( ! 'O0' => ['set-variable kb-option-mainoptimization'], ! 'Os' => ['set-variable kb-option-mainoptimization'], ! 'O1' => ['set-variable kb-option-mainoptimization'], ! 'O2' => ['set-variable kb-option-mainoptimization'], ! 'O3' => ['set-variable kb-option-mainoptimization'], 'caller-save' => ['nop'], 'cse-follow-jumps' => ['implied-by O2 O3'], --- 65,77 ---- my %COMPILER_FAKE_OPTIONS_GXX_295x = ( ! 'O0' => ['option-exclusive kb-option-mainoptimization'], ! 'Os' => ['option-exclusive kb-option-mainoptimization', ! 'option-want alignment-disabled 1'], ! 'O1' => ['option-exclusive kb-option-mainoptimization', ! 'option-want alignment-disabled 0'], ! 'O2' => ['option-exclusive kb-option-mainoptimization', ! 'option-want alignment-disabled 0'], ! 'O3' => ['option-exclusive kb-option-mainoptimization', ! 'option-want alignment-disabled 0'], 'caller-save' => ['nop'], 'cse-follow-jumps' => ['implied-by O2 O3'], *************** *** 88,95 **** ); our %COMPILER_FAKE_OPTIONS = ( 'gcc-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x, ! # 'g++-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x ); --- 96,135 ---- ); + my %COMPILER_FAKE_OPTIONS_GPP_295x = + ( + %COMPILER_FAKE_OPTIONS_GXX_295x, + 'elide-constructors' => ['nop'] + ); + + my %COMPILER_FAKE_OPTIONS_GXX_30x = + ( + %COMPILER_FAKE_OPTIONS_GXX_295x, + 'ssa' => ['implied-by O2 O3'], + 'dce' => ['implied-by O2 O3', + 'option-require ssa '], + 'no-align-functions' => ['option-want alignment-disabled 1', + 'implied-by Os'], + 'align-functions' => ['option-want alignment-disabled 0', + 'implied-by O2 O3'], + 'no-align-labels' => ['option-want alignment-disabled 1', + 'implied-by Os'], + 'align-labels' => ['option-want alignment-disabled 0', + 'implied-by O2 O3'], + 'no-align-loops' => ['option-want alignment-disabled 1', + 'implied-by Os'], + 'align-loops' => ['option-want alignment-disabled 0', + 'implied-by O2 O3'], + 'no-align-jumps' => ['option-want alignment-disabled 1', + 'implied-by Os'], + 'align-jumps' => ['option-want alignment-disabled 0', + 'implied-by O2 O3'], + ); + our %COMPILER_FAKE_OPTIONS = ( 'gcc-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x, ! 'g++-2.95.x' => \%COMPILER_FAKE_OPTIONS_GPP_295x, ! 'gcc-3.0.x' => \%COMPILER_FAKE_OPTIONS_GXX_30x, ! 'g++-3.0.x' => \%COMPILER_FAKE_OPTIONS_GXX_30x ); |
From: Frederic T. <xf...@us...> - 2007-04-12 19:56:43
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14632 Modified Files: Makefile.am Added Files: compiler-fake-g++-3.0.4 compiler-fake-gcc-3.0.4 Log Message: gxx-3.0.4 fake scripts added. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 22 Mar 2007 19:36:51 -0000 1.8 --- Makefile.am 12 Apr 2007 19:56:36 -0000 1.9 *************** *** 3,6 **** --- 3,10 ---- compiler-fake-gcc-4.1.1-13 \ compiler-fake-gcc-3.2.3-20-rh \ + compiler-fake-gcc-2.95.3 \ + compiler-fake-g++-2.95.3 \ + compiler-fake-gcc-3.0.4 \ + compiler-fake-g++-3.0.4 \ compiler-fake-tcc-0.9.23 \ compbenchmarks-0.xml compbenchmarks-1.xml \ --- NEW FILE: compiler-fake-g++-3.0.4 --- #!/bin/sh cat <<EOF 3.0.4 EOF --- NEW FILE: compiler-fake-gcc-3.0.4 --- #!/bin/sh cat <<EOF 3.0.4 EOF |
From: Frederic T. <xf...@us...> - 2007-04-12 19:55:42
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14255 Modified Files: Compiler.cpp Compiler.h Compiler-Option-Description.cpp Compiler-Option-Description.h Compiler-Option-Logic.cpp Compiler-Option-Logic.h Log Message: CEL obsoleted. Logic is integrated within descriptions. Many improvements in 'option logic' related API. Index: Compiler.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Compiler.h 9 Apr 2007 10:07:12 -0000 1.10 --- Compiler.h 12 Apr 2007 19:55:37 -0000 1.11 *************** *** 20,33 **** #include <Plan/Plan.h> #include <Compiler/Compiler-Option-Description.h> - #include <CEL/CEL-Atom.h> %} #define CBM_PLAN CBM::Plan #define CBM_COD CBM::CompilerOptionDescriptions - #define CBM_CEL CBM::CelAtom - #else # define CBM_PLAN class Plan # define CBM_COD class CompilerOptionDescriptions - # define CBM_CEL class CelAtom #endif --- 20,29 ---- *************** *** 36,39 **** --- 32,42 ---- + + typedef struct CompilerOptionLogicVar { + std::string id; + std::string value; + std::string lastWriter; + }; + /** \brief Abstraction layer for handling compilers. * *************** *** 65,68 **** --- 68,76 ---- int supportedVersionInitialized; + std::vector<CompilerOptionLogicVar*> colVariables; + std::vector<std::string> colOptions; + + CBM_COD *cacheOptionDescriptions; + protected: /** Used internally to get information on compiler's binary */ *************** *** 110,113 **** --- 118,124 ---- virtual void supportedVersions(void); + virtual void colDestroy(void); + + public: *************** *** 146,150 **** virtual CBM_COD *OptionDescriptions(void); ! virtual CBM_CEL *OptionLogics(void); virtual int supportedVersionNumber(void); --- 157,173 ---- virtual CBM_COD *OptionDescriptions(void); ! ! virtual CompilerOptionLogicVar* colVarGet(std::string _id); ! ! /** _writerOption is the option (ID) that sets the value */ ! virtual void colVarSet(std::string _id, ! std::string _value, ! std::string _writerOption); ! ! virtual std::string colVarWriter(std::string _id); ! ! virtual int colOptionHas(std::string _option); ! ! virtual std::string analyzeOptions(std::string _options); virtual int supportedVersionNumber(void); Index: Compiler-Option-Description.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Compiler-Option-Description.cpp 5 Apr 2007 17:09:09 -0000 1.5 --- Compiler-Option-Description.cpp 12 Apr 2007 19:55:37 -0000 1.6 *************** *** 8,24 **** #include <Compiler/Compiler-Option-Description.h> ! #include <CEL/CEL-Include.h> ! #include <CEL/CEL-Reader.h> ! // #include <CEL/CEL-Stack.h> ! // #include <CEL/CEL-Function.h> ! // #include <CEL/CEL-Version.h> ! // #include <CEL/CEL-Block.h> ! // #include <CEL/CEL-Str.h> #include <Base/XMLReader.h> using namespace CBM; ! CompilerOptionDescription::CompilerOptionDescription(CBM::XMLNode *_from) { int i; --- 8,46 ---- #include <Compiler/Compiler-Option-Description.h> ! #include <Compiler/Compiler-Option-Logic.h> ! #include <Compiler/Compiler.h> + #include <System/System.h> #include <Base/XMLReader.h> using namespace CBM; ! std::vector<std::string> CBM::descriptionIncludePaths; ! ! void CBM::descriptionIncludePathAdd(std::string _path) ! { ! descriptionIncludePaths.push_back(_path); ! } ! ! std::string CBM::descriptionFullIncludeName(std::string _relativeFN) ! { ! int i; ! int n = descriptionIncludePaths.size(); ! std::string r; ! ! for(i=0; i<n; i++) { ! r=descriptionIncludePaths[i]; ! r+="/"; ! r+=_relativeFN; ! if (cbmSystem->fileExists(r)) { ! return(r); ! } ! } ! return(_relativeFN); ! } ! ! ! CompilerOptionDescription::CompilerOptionDescription(CBM::XMLNode *_from, ! CompilerOptionDescriptions *_parent) { int i; *************** *** 27,30 **** --- 49,54 ---- CBM::XMLAttribute *A; + logic=0; + parent=_parent; A=_from->getAttribute("id"); if (A) *************** *** 39,42 **** --- 63,71 ---- if (N->Name() == "editor-description") editorDescription=N->Value(); + if (N->Name() == "logic") { + logic=new CBM::CompilerOptionLogic(_parent, + this, + N); + } } } *************** *** 62,65 **** --- 91,108 ---- } + std::string CompilerOptionDescription::Use(void) + { + std::string tmp; + + if (logic) + return(logic->use()); + else { + tmp="Logic for option "; + tmp+=Id(); + tmp+=" not implemented. Ignored."; + return(tmp); + } + } + CompilerOptionDescription::~CompilerOptionDescription() *************** *** 67,72 **** } ! CompilerOptionDescriptions::CompilerOptionDescriptions(std::string _baseDir) { descriptionFile = _baseDir; descriptionFile+="/description.xml"; --- 110,118 ---- } ! CompilerOptionDescriptions::CompilerOptionDescriptions(CBM::Compiler *_compiler, ! std::string _baseDir) { + compiler=_compiler; + descriptionFile = _baseDir; descriptionFile+="/description.xml"; *************** *** 87,91 **** std::string tmp; ! _fileName=CBM::CelFullIncludeName(_fileName); root=R.read(_fileName); --- 133,137 ---- std::string tmp; ! _fileName=CBM::descriptionFullIncludeName(_fileName); root=R.read(_fileName); *************** *** 104,117 **** N=root->getNode(i); if (N->Name() == "option") { ! D=new CompilerOptionDescription(N); ! options.push_back(D); continue; } if (N->Name() == "include") { ! A=N->getAttribute("description-path"); if (A) { tmp=A->Value(); - tmp+="/description.xml"; parse(tmp); } --- 150,162 ---- N=root->getNode(i); if (N->Name() == "option") { ! D=new CompilerOptionDescription(N, this); ! descriptions.push_back(D); continue; } if (N->Name() == "include") { ! A=N->getAttribute("file"); if (A) { tmp=A->Value(); parse(tmp); } *************** *** 128,132 **** int CompilerOptionDescriptions::DescriptionNumber(void) { ! return(options.size()); } --- 173,177 ---- int CompilerOptionDescriptions::DescriptionNumber(void) { ! return(descriptions.size()); } *************** *** 134,138 **** { if (_index<DescriptionNumber()) ! return(options[_index]); else return(0); --- 179,183 ---- { if (_index<DescriptionNumber()) ! return(descriptions[_index]); else return(0); *************** *** 146,150 **** for(i=0; i<n; i++) { ! D=options[i]; if (D->Id() == _id) return(D); --- 191,195 ---- for(i=0; i<n; i++) { ! D=descriptions[i]; if (D->Id() == _id) return(D); *************** *** 153,156 **** --- 198,221 ---- } + #include <iostream> + CompilerOptionDescription *CompilerOptionDescriptions::DescriptionLitteral(std::string _litt) + { + CompilerOptionDescription *D; + int i; + int n = DescriptionNumber(); + + for(i=0; i<n; i++) { + D=descriptions[i]; + if (D->Option() == _litt) + return(D); + } + return(0); + } + + CBM::Compiler *CompilerOptionDescriptions::Compiler(void) + { + return(compiler); + } + CompilerOptionDescriptions::~CompilerOptionDescriptions() { *************** *** 163,165 **** --- 228,231 ---- delete(D); } + descriptions.clear(); } Index: Compiler-Option-Logic.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Logic.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Compiler-Option-Logic.h 11 Apr 2007 20:31:13 -0000 1.1 --- Compiler-Option-Logic.h 12 Apr 2007 19:55:37 -0000 1.2 *************** *** 14,24 **** namespace CBM { typedef enum CompilerOptionLogicCommandID { ! Unknown, Exclusive, ImpliedBy, Requires, FlagSet, FlagAssert }; typedef struct CompilerOptionLogicCommand { CompilerOptionLogicCommandID id; ! std::string argumentOption; ! std::string extraValue; }; --- 14,26 ---- namespace CBM { typedef enum CompilerOptionLogicCommandID { ! Unknown, Exclusive, ImpliedBy, Requires }; typedef struct CompilerOptionLogicCommand { CompilerOptionLogicCommandID id; ! int testOption; /* 1 for option, 0 internal */ ! std::string internalVarName; /* argumentOption; */ ! std::string internalVarValue; ! std::string optionReferred; }; Index: Compiler-Option-Description.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Compiler-Option-Description.h 5 Apr 2007 17:08:03 -0000 1.5 --- Compiler-Option-Description.h 12 Apr 2007 19:55:37 -0000 1.6 *************** *** 12,16 **** --- 12,38 ---- #include <Base/XML.h> + #ifdef SWIG + /* !!! If in SWIG parser, we need to define CBM::Plan so that all methods get + * correctly wrapped. Hope there's a better solution... */ + %module CBM + %{ + #include <Compiler/Compiler.h> + #include <Compiler/Compiler-Option-Logic.h> + %} + #define CBM_COM CBM::Compiler + #define CBM_COL CBM::CompilerOptionLogic + #define CBM_CODs CBM::CompilerOptionDescriptions + #else + # define CBM_COM class Compiler + # define CBM_COL class CompilerOptionLogic + # define CBM_CODs class CompilerOptionDescriptions + #endif + namespace CBM { + + extern std::vector<std::string> descriptionIncludePaths; + void descriptionIncludePathAdd(std::string _path); + std::string descriptionFullIncludeName(std::string _relativeFN); + /** \brief Interface helping to describe compiler' option. * Compiler options can be described through XML files to provide both *************** *** 34,37 **** --- 56,62 ---- std::string option; + CBM_CODs *parent; + CBM_COL *logic; + protected: *************** *** 40,44 **** \param _from XML node to initialise object */ ! CompilerOptionDescription(XMLNode *_from); /** Get option's internal ID --- 65,70 ---- \param _from XML node to initialise object */ ! CompilerOptionDescription(XMLNode *_from, ! CBM_CODs *_parent); /** Get option's internal ID *************** *** 58,61 **** --- 84,89 ---- virtual std::string Option(void); + virtual std::string Use(void); + virtual ~CompilerOptionDescription(); }; *************** *** 69,74 **** { private: ! /** Known options */ ! std::vector<CompilerOptionDescription*> options; std::string descriptionFile; --- 97,104 ---- { private: ! /** Descriptions read */ ! std::vector<CompilerOptionDescription*> descriptions; ! CBM_COM *compiler; ! std::string descriptionFile; *************** *** 83,87 **** * \param _baseDir Directory containings description.xml for the compiler */ ! CompilerOptionDescriptions(std::string _baseDir); virtual std::string DescriptionFile(void); --- 113,118 ---- * \param _baseDir Directory containings description.xml for the compiler */ ! CompilerOptionDescriptions(CBM_COM *_compiler, ! std::string _baseDir); virtual std::string DescriptionFile(void); *************** *** 103,106 **** --- 134,141 ---- virtual CompilerOptionDescription *Description(std::string _id); + virtual CompilerOptionDescription *DescriptionLitteral(std::string _litt); + + virtual CBM_COM *Compiler(void); + /** Destructor */ virtual ~CompilerOptionDescriptions(); Index: Compiler.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Compiler.cpp 9 Apr 2007 10:07:12 -0000 1.10 --- Compiler.cpp 12 Apr 2007 19:55:37 -0000 1.11 *************** *** 11,19 **** #include <Compiler/Compiler-TCC/Compiler-TCC.h> #include <Compiler/Compiler-Option-Description.h> #include <Plan/Plan.h> ! #include <CEL/CEL-Include.h> ! #include <CEL/CEL-Version.h> ! #include <CEL/CEL-Reader.h> #include <System/System.h> --- 11,23 ---- #include <Compiler/Compiler-TCC/Compiler-TCC.h> #include <Compiler/Compiler-Option-Description.h> + #include <Compiler/Compiler-Version.h> + #include <Plan/Plan.h> ! /* #include <CEL/CEL-Include.h> ! #include <CEL/CEL-Version.h> ! #include <CEL/CEL-Reader.h> ! */ ! #include <System/System.h> *************** *** 31,34 **** --- 35,39 ---- compilerBinary=_compilerBinary; plan=0; + cacheOptionDescriptions=0; } *************** *** 113,117 **** std::string Compiler::relativeDescriptionDirectory(void) { ! CBM::CelVersion V("0.0.0"); int differences; std::string result; --- 118,122 ---- std::string Compiler::relativeDescriptionDirectory(void) { ! CBM::CompilerVersion V; int differences; std::string result; *************** *** 128,143 **** return("!!! no supported version found"); ! V.setInternal(_version); ! v_int=V.AsInteger(); result=supportedVersionDirectories[0]; ! V.setInternal(result); ! c_int=V.AsInteger(); differences=v_int-c_int; for(i=1; i<n; i++) { ! V.setInternal(supportedVersionDirectories[i]); ! c_int=V.AsInteger(); ! if (v_int<c_int) continue; --- 133,144 ---- return("!!! no supported version found"); ! v_int=V.AsInteger(_version); result=supportedVersionDirectories[0]; ! c_int=V.AsInteger(result); differences=v_int-c_int; for(i=1; i<n; i++) { ! c_int=V.AsInteger(supportedVersionDirectories[i]); if (v_int<c_int) continue; *************** *** 148,152 **** } } ! if (differences<0) return("!!! this version is not supported and no compatibility found."); --- 149,153 ---- } } ! if (differences<0) return("!!! this version is not supported and no compatibility found."); *************** *** 157,185 **** CBM::CompilerOptionDescriptions *Compiler::OptionDescriptions(void) { ! std::string tmp = compiler(); ! tmp+="/"; ! tmp+=relativeDescriptionDirectory(); ! return(new CBM::CompilerOptionDescriptions(tmp)); } ! #include <iostream> ! CBM::CelAtom *Compiler::OptionLogics(void) { ! std::string tmp = compiler(); ! CBM::CelReader *R; ! CBM::CelAtom *A; ! tmp+="/"; ! tmp+=relativeDescriptionDirectory(); ! tmp+="/options.xml"; ! R=new CBM::CelReader(tmp); ! std::cerr << "CEL : " << tmp << std::endl; ! A=R->parse(); ! delete(R); ! if (A) ! A->Evaluate(); ! return(A); } --- 158,272 ---- CBM::CompilerOptionDescriptions *Compiler::OptionDescriptions(void) { ! std::string tmp; ! ! if (!cacheOptionDescriptions) { ! tmp = compiler(); ! tmp+="/"; ! tmp+=relativeDescriptionDirectory(); ! cacheOptionDescriptions=new CBM::CompilerOptionDescriptions(this, tmp); ! } ! ! return(cacheOptionDescriptions); } ! CompilerOptionLogicVar* Compiler::colVarGet(std::string _id) { ! int i = 0; ! int n = colVariables.size(); ! CompilerOptionLogicVar *tmp; ! ! for(i=0; i<n; i++) { ! tmp=colVariables[i]; ! if (tmp->id==_id) ! return(tmp); ! } ! return(0); ! } ! void Compiler::colVarSet(std::string _id, ! std::string _value, ! std::string _writerOption) ! { ! CompilerOptionLogicVar *tmp = colVarGet(_id); ! if (!tmp) { ! tmp=new CompilerOptionLogicVar; ! tmp->id=_id; ! colVariables.push_back(tmp); ! } ! tmp->value=_value; ! tmp->lastWriter=_writerOption; ! } ! ! std::string Compiler::colVarWriter(std::string _id) ! { ! CompilerOptionLogicVar *tmp = colVarGet(_id); ! ! if (tmp) ! return(tmp->lastWriter); ! else ! return("undef"); ! } ! ! int Compiler::colOptionHas(std::string _option) ! { ! int i = 0; ! int n = colOptions.size(); ! ! for(i=0; i<n; i++) { ! if (colOptions[i] == _option) ! return(1); ! } ! return(0); ! } ! ! std::string Compiler::analyzeOptions(std::string _options) ! { ! int i = 0; ! std::string o = "!"; ! CompilerOptionDescriptions *OD; ! CompilerOptionDescription *D; ! std::string r; ! int times = 0; ! int lastOk = 0; ! std::string tmp; ! ! while (o!="") { ! o=cbmSystem->Split(_options, " ", i++); ! if (o=="") ! break; ! times++; ! OD=OptionDescriptions(); ! D=OD->DescriptionLitteral(o); ! if (!D) { ! r+="Ignored option "; ! r+=o; ! r+=" (not supported)\n"; ! lastOk=1; ! } else { ! tmp=D->Use(); ! lastOk=(tmp=="1"); ! r+=tmp; ! r+="\n"; ! } ! if (lastOk) ! if (colOptionHas(D->Id())) { ! tmp="Option "; ! tmp+=o; ! tmp+=" given multiple times"; ! r+=tmp; ! r+="\n"; ! } else { ! colOptions.push_back(D->Id()); ! } ! } ! ! colDestroy(); ! ! if (!times) ! r="1\n"; ! ! return(r); } *************** *** 187,191 **** { int i; ! int n = CBM::celincludespaths.size(); std::string dum; --- 274,278 ---- { int i; ! int n = CBM::descriptionIncludePaths.size(); std::string dum; *************** *** 195,199 **** supportedVersionInitialized=1; for(i=0; i<n; i++) { ! dum=CBM::celincludespaths[i]; dum+="/"; dum+=compiler(); --- 282,286 ---- supportedVersionInitialized=1; for(i=0; i<n; i++) { ! dum=CBM::descriptionIncludePaths[i]; dum+="/"; dum+=compiler(); *************** *** 202,209 **** } int Compiler::supportedVersionNumber(void) { ! if (!supportedVersionInitialized) ! supportedVersions(); return(supportedVersionDirectories.size()); --- 289,309 ---- } + void Compiler::colDestroy(void) + { + std::vector<std::string> ncolOptions; + int i; + int n; + + colOptions=ncolOptions; + + n=colVariables.size(); + for(i=0;i<n;i++) + delete(colVariables[i]); + colVariables.clear(); + } + int Compiler::supportedVersionNumber(void) { ! supportedVersions(); return(supportedVersionDirectories.size()); *************** *** 212,217 **** std::string Compiler::supportedVersion(int _index) { ! if (!supportedVersionInitialized) ! supportedVersions(); if (_index<supportedVersionNumber()) --- 312,316 ---- std::string Compiler::supportedVersion(int _index) { ! supportedVersions(); if (_index<supportedVersionNumber()) *************** *** 224,227 **** --- 323,328 ---- { setPlan(0, 1); + if (cacheOptionDescriptions) + delete(cacheOptionDescriptions); } Index: Compiler-Option-Logic.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Logic.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Compiler-Option-Logic.cpp 11 Apr 2007 20:31:13 -0000 1.1 --- Compiler-Option-Logic.cpp 12 Apr 2007 19:55:37 -0000 1.2 *************** *** 34,39 **** cmd=new CompilerOptionLogicCommand; cmd->id=Exclusive; ! cmd->argumentOption=A->Value(); ! cmd->extraValue=_description->Id(); commands.push_back(cmd); continue; --- 34,48 ---- cmd=new CompilerOptionLogicCommand; cmd->id=Exclusive; ! ! cmd->internalVarName=A->Value(); ! A=N->getAttribute("value"); ! ! if (!A) { ! cmd->testOption=1; ! cmd->optionReferred=_description->Id(); ! } else { ! cmd->testOption=0; ! cmd->internalVarValue=A->Value(); ! } commands.push_back(cmd); continue; *************** *** 46,51 **** cmd=new CompilerOptionLogicCommand; cmd->id=ImpliedBy; ! cmd->argumentOption=A->Value(); ! cmd->extraValue=""; commands.push_back(cmd); continue; --- 55,60 ---- cmd=new CompilerOptionLogicCommand; cmd->id=ImpliedBy; ! cmd->optionReferred=A->Value(); ! cmd->testOption=1; commands.push_back(cmd); continue; *************** *** 58,108 **** cmd=new CompilerOptionLogicCommand; cmd->id=Requires; ! cmd->argumentOption=A->Value(); ! cmd->extraValue=""; ! commands.push_back(cmd); ! continue; ! } ! ! ! if (N->Name() == "logic-flag-set") { ! A=N->getAttribute("id"); ! if (!A) ! continue; ! cmd=new CompilerOptionLogicCommand; ! cmd->id=FlagSet; ! cmd->argumentOption=A->Value(); ! ! A=N->getAttribute("value"); ! if (!A) ! cmd->extraValue="0"; ! else ! cmd->extraValue=A->Value(); ! ! commands.push_back(cmd); ! continue; ! } ! ! if (N->Name() == "logic-flag-assert") { ! A=N->getAttribute("id"); ! if (!A) ! continue; ! cmd=new CompilerOptionLogicCommand; ! cmd->id=FlagAssert; ! cmd->argumentOption=A->Value(); ! ! A=N->getAttribute("value"); ! if (!A) ! cmd->extraValue="0"; ! else ! cmd->extraValue=A->Value(); ! commands.push_back(cmd); continue; } - } - } std::string CompilerOptionLogic::use(void) { --- 67,79 ---- cmd=new CompilerOptionLogicCommand; cmd->id=Requires; ! cmd->optionReferred=A->Value(); ! cmd->testOption=1; commands.push_back(cmd); continue; } } } + #include <iostream> std::string CompilerOptionLogic::use(void) { *************** *** 111,133 **** CBM::CompilerOptionLogicCommand *cmd; CBM::Compiler *C = context->Compiler(); ! ! CBM::CompilerOptionLogicFlag *flag; CBM::CompilerOptionLogicVar *var; std::string tmp; ! for(i=0; i<n; i++) { cmd=commands[i]; switch(cmd->id) { case Exclusive: ! var=C->colVarGet(cmd->argumentOption); if (!var) { ! C->colVarSet(cmd->argumentOption, ! cmd->extraValue); } else { ! if (var->value!=cmd->extraValue) { tmp="Option "; ! tmp+=context->Description(cmd->extraValue)->Option(), tmp+=" is incompatible with "; ! tmp+=context->Description(var->value)->Option(); return(tmp); } --- 82,120 ---- CBM::CompilerOptionLogicCommand *cmd; CBM::Compiler *C = context->Compiler(); ! CBM::CompilerOptionDescription *D; CBM::CompilerOptionLogicVar *var; std::string tmp; ! ! std::string varname; ! std::string varvalue; ! for(i=0; i<n; i++) { cmd=commands[i]; switch(cmd->id) { case Exclusive: ! varname=cmd->internalVarName; ! var=C->colVarGet(varname); ! ! if (cmd->testOption) ! varvalue=cmd->optionReferred; ! else ! varvalue=cmd->internalVarValue; ! if (!var) { ! C->colVarSet(varname, ! varvalue, ! description->Id()); } else { ! if (var->value!=varvalue) { tmp="Option "; ! tmp+=description->Option(); ! tmp+=" is incompatible with "; ! if (cmd->testOption) { ! D=context->Description(var->value); ! tmp+=D->Option(); ! } else { ! tmp+=context->Description(var->lastWriter)->Option(); ! } return(tmp); } *************** *** 135,181 **** break; case ImpliedBy: ! if (C->colOptionHas(cmd->argumentOption)) { tmp="Option "; tmp+=description->Option(); tmp+=" is implied by "; ! tmp+=context->Description(cmd->argumentOption)->Option(); return(tmp); } break; case Requires: ! if (!C->colOptionHas(cmd->argumentOption)) { tmp="Option "; tmp+=description->Option(); ! tmp+=" requieres "; ! tmp+=context->Description(cmd->argumentOption)->Option(); ! return(tmp); ! } ! break; ! case FlagSet: ! C->colFlagSet(cmd->argumentOption, ! cmd->extraValue); ! break; ! case FlagAssert: ! flag=C->colFlagGet(cmd->argumentOption); ! if ((!flag) && (cmd->extraValue=="0")) ! return("1"); ! ! if (((flag) && (flag->value!=cmd->extraValue)) || ! (!flag)) { ! tmp="Check failed : "; ! tmp+=context->Description(cmd->argumentOption)->Option(); ! tmp+=" must be "; ! tmp+=cmd->extraValue; ! if (flag) { ! tmp+=" (has "; ! tmp+=flag->value; ! tmp+=")"; ! } else { ! tmp+=" (not defined)"; ! } return(tmp); } break; - default: return("Unknown command in option analyzing"); --- 122,142 ---- break; case ImpliedBy: ! if (C->colOptionHas(cmd->optionReferred)) { tmp="Option "; tmp+=description->Option(); tmp+=" is implied by "; ! tmp+=context->Description(cmd->optionReferred)->Option(); return(tmp); } break; case Requires: ! if (!C->colOptionHas(cmd->optionReferred)) { tmp="Option "; tmp+=description->Option(); ! tmp+=" requires "; ! tmp+=context->Description(cmd->optionReferred)->Option(); return(tmp); } break; default: return("Unknown command in option analyzing"); |
From: Frederic T. <xf...@us...> - 2007-04-12 16:51:34
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++/2.95.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8423 Modified Files: description.xml Makefile.am Removed Files: options.xml Log Message: CEL obsoleted. Logic is integrated within descriptions. --- options.xml DELETED --- Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++/2.95.x/description.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** description.xml 4 Apr 2007 18:29:01 -0000 1.1 --- description.xml 12 Apr 2007 16:51:31 -0000 1.2 *************** *** 2,6 **** <options> ! <include description-path="gxx/2.95.x"/> <option id="elide-constructors"> --- 2,6 ---- <options> ! <include file="gxx/2.95.x/description.xml"/> <option id="elide-constructors"> Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++/2.95.x/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 4 Apr 2007 18:29:01 -0000 1.1 --- Makefile.am 12 Apr 2007 16:51:31 -0000 1.2 *************** *** 8,12 **** # ----------------------------------------------------------------------------- ! data_DATA = description.xml options.xml datarootdir=@datarootdir@/compbenchmarks/@VERSION@/KB/g++/2.95.x --- 8,12 ---- # ----------------------------------------------------------------------------- ! data_DATA = description.xml datarootdir=@datarootdir@/compbenchmarks/@VERSION@/KB/g++/2.95.x |
From: Frederic T. <xf...@us...> - 2007-04-12 16:51:00
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gcc/2.95.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8047 Modified Files: description.xml Log Message: CEL obsoleted. Logic is integrated within descriptions. Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gcc/2.95.x/description.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** description.xml 4 Apr 2007 18:31:34 -0000 1.1 --- description.xml 12 Apr 2007 16:50:57 -0000 1.2 *************** *** 10,13 **** <options> ! <include description-path="gxx/2.95.x"/> </options> \ No newline at end of file --- 10,13 ---- <options> ! <include file="gxx/2.95.x/description.xml"/> </options> \ No newline at end of file |
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7995 Modified Files: arch.xml cse.xml description.xml inline.xml loops.xml mainopt.xml Makefile.am Removed Files: options.xml Log Message: CEL obsoleted. Logic is integrated within descriptions. --- options.xml DELETED --- Index: inline.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/inline.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** inline.xml 20 Mar 2007 20:33:16 -0000 1.1 --- inline.xml 12 Apr 2007 16:50:36 -0000 1.2 *************** *** 9,54 **** --> ! <!-- inlining related options for gxx --> ! <!-- included by gxx/options.xml --> ! <cel> ! <!-- inline-functions --> ! <cel-function-def> ! <cel-str>kb-gxx-option-inline-functions-is-compatible</cel-str> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O3</cel-str> ! </cel-cmp-eq> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-str>option implied by -O3</cel-str> ! </cel-var-set> ! </cel-cond-if> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! </cel-function-def> ! <!-- Not integrated (seem useless for optimizations measurement : --> ! <!-- keep-inline-functions --> ! <!-- no-default-inline --> ! </cel> \ No newline at end of file --- 9,32 ---- --> ! <!-- Inlining option for 'gxx' (includes gcc and g++) --> ! <options> ! <option id="inline-functions"> ! <value>-finline-functions</value> ! <short-description>Integrate all simple functions into their callers</short-description> ! <editor-description> ! Integrate all simple functions into their callers. The compiler ! heuristically decides which functions are simple enough to be ! worth integrating in this way. ! If all calls to a given function are integrated, and the function ! is declared static, then GCC normally does not output the ! function as assembler code in its own right. ! </editor-description> ! <logic> ! <logic-option-implied-by id="O3"/> ! </logic> ! </option> ! </options> \ No newline at end of file Index: arch.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/arch.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** arch.xml 20 Mar 2007 20:33:14 -0000 1.1 --- arch.xml 12 Apr 2007 16:50:36 -0000 1.2 *************** *** 9,67 **** --> ! <!-- Architecture related options for gxx --> ! <!-- included by gxx/options.xml --> ! <!-- !!! Should check real platform architecture in matches --> ! <cel> - <!-- m486 --> - <cel-function-def> - <cel-str>kb-gxx-option-m486-is-compatible</cel-str> - <cel-var-set> - <cel-str>result</cel-str> - <cel-function-call> - <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> - </cel-function-call> - </cel-var-set> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-block> ! <cel-stack-push> ! <cel-str>kb-option-cpu</cel-str> ! </cel-stack-push> ! <cel-stack-push> ! <cel-str>-m486</cel-str> ! </cel-stack-push> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-common-option-apply</cel-str> ! </cel-function-call> ! </cel-var-set> ! </cel-block> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! </cel-function-def> ! ! <!-- no-fp-ret-in-387 --> ! <cel-function-def> ! <cel-str>kb-gxx-option-no-fp-ret-in-387-is-compatible</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-function-def> ! <!-- Not integrated (seem useless for optimizations measurement) : --> ! <!-- -msoft-float --> ! </cel> --- 9,41 ---- --> ! <!-- Architecture related options for 'gxx' (includes gcc and g++) --> ! <options> ! <option id="m486"> ! <value>-m486</value> ! <short-description>Generate i486 optimized code</short-description> ! <editor-description> ! Control whether or not code is optimized for a 486 instead of an ! 386. Code generated for a 486 will run on a 386 and vice versa. ! </editor-description> ! </option> ! <option id="no-fp-ret-in-387"> ! <value>-fno-fp-ret-in-387</value> ! <short-description>Do not use FPU to return values</short-description> ! <editor-description> ! Do not use the FPU registers for return values of functions. ! The usual calling convention has functions return values of ! types float and double in an FPU register, even if there is no ! FPU. The idea is that the operating system should emulate an ! FPU. ! The option `-mno-fp-ret-in-387' causes such values to be ! returned in ordinary CPU registers instead. ! </editor-description> ! </option> ! </options> \ No newline at end of file Index: description.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/description.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** description.xml 11 Apr 2007 20:22:29 -0000 1.2 --- description.xml 12 Apr 2007 16:50:36 -0000 1.3 *************** *** 11,116 **** <!-- Options for 'gxx' (includes gcc and g++) --> - <!-- cel-interface is gxx/options.xml by default and should - be evaluated --> - <!-- globaly; that's the default since all compilers'll have their --> - <!-- own descriptions --> - <options> ! <!-- ! <include file="common/common.xml" type="cel"/> ! --> ! <option id="O0"> ! <value>-O0</value> ! <short-description>Globally disable compiler optimization</short-description> ! <editor-description> ! Do not optimize. This is the default ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! </logic> ! </option> ! ! <option id="Os"> ! <value>-Os</value> ! <short-description>Globally optimize for size</short-description> ! <editor-description> ! 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 ! ! If you use multiple -O options, with or without level numbers, the last ! such option is the one that is effective. ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! <logic-flag-set id="alignment-disabled" value="1"/> ! </logic> ! </option> ! ! <option id="O1"> ! <value>-O1</value> ! <short-description>Global optimization, level 1</short-description> ! <editor-description> ! Optimize. Optimizing compilation takes somewhat more time, and ! a lot more memory for a large function. ! ! Without `-O', the compiler's goal is to reduce the cost of ! compilation and to make debugging produce the expected results. ! Statements are independent: if you stop the program with a ! breakpoint between statements, you can then assign a new value ! to any variable or change the program counter to any other ! statement in the function and get exactly the results you would ! expect from the source code. ! ! Without `-O', only variables declared register are allocated in ! registers. The resulting compiled code is a little worse than ! produced by PCC without `-O'. ! ! With `-O', the compiler tries to reduce code size and execution ! time. ! ! When you specify `-O', the two options `-fthread-jumps' and ! `-fdefer-pop' are turned on. On machines that have delay slots, ! the `-fdelayed-branch' option is turned on. For those machines ! that can support debugging even without a frame pointer, the ! `-fomit-frame-pointer' option is turned on. On some machines ! other flags may also be turned on. ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! <logic-flag-set id="alignment-disabled" value="0"/> ! </logic> ! </option> ! ! <option id="O2"> ! <value>-O2</value> ! <short-description>Global optimization, level 2</short-description> ! <editor-description> ! Optimize even more than -O1. Nearly all supported optimizations that ! do not involve a space-speed tradeoff are performed. Loop unrolling ! and function inlining are not done, for example. As compared to -O, this ! option increases both compilation time and the performance of the ! generated code. ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! </logic> ! </option> ! ! <option id="O3"> ! <value>-O3</value> ! <short-description>Global optimization, level 3</short-description> ! <editor-description> ! Optimize yet more. This turns on everything -O2 does, along with also ! turning on -finline-functions. ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! </logic> ! </option> <option id="caller-save"> --- 11,20 ---- <!-- Options for 'gxx' (includes gcc and g++) --> <options> ! <include file="gxx/2.95.x/mainopt.xml"/> ! <include file="gxx/2.95.x/arch.xml"/> ! <include file="gxx/2.95.x/cse.xml"/> ! <include file="gxx/2.95.x/inline.xml"/> ! <include file="gxx/2.95.x/loops.xml"/> <option id="caller-save"> *************** *** 129,163 **** </option> - <option id="cse-follow-jumps"> - <value>-fcse-follow-jumps</value> - <short-description>Always scan through jump instructions in common subexpression elimination</short-description> - <editor-description> - In common subexpression elimination, scan through jump instructions - when the target of the jump is not reached by any other - path. For example, when CSE encounters an if statement with an else - clause, CSE will follow the jump when the condition tested - is false. - </editor-description> - <logic> - <logic-option-implied-by id="O2"/> - <logic-option-implied-by id="O3"/> - </logic> - </option> - <option id="cse-skip-blocks"> - <value>-fcse-skip-blocks</value> - <short-description>Always scan through conditionnal jump instructions in common subexpression elimination</short-description> - <editor-description> - This is similar to `-fcse-follow-jumps', but causes CSE to follow - jumps which conditionally skip over blocks. When CSE encounters - a simple if statement with no else clause, - `-fcse-skip-blocks' causes CSE to follow the jump around the - body of the if. - </editor-description> - <logic> - <logic-option-implied-by id="O2"/> - <logic-option-implied-by id="O3"/> - </logic> - </option> <option id="delayed-branch"> --- 33,37 ---- *************** *** 254,274 **** </option> - <option id="inline-functions"> - <value>-finline-functions</value> - <short-description>Integrate all simple functions into their callers</short-description> - <editor-description> - Integrate all simple functions into their callers. The compiler - heuristically decides which functions are simple enough to be - worth integrating in this way. - - If all calls to a given function are integrated, and the function - is declared static, then GCC normally does not output the - function as assembler code in its own right. - </editor-description> - <logic> - <logic-option-implied-by id="O3"/> - </logic> - </option> - <option id="omit-frame-pointer"> <value>-fomit-frame-pointer</value> --- 128,131 ---- *************** *** 289,305 **** </option> - <option id="rerun-cse-after-loop"> - <value>-frerun-cse-after-loop</value> - <short-description>Re-run CSE after loop optimizations</short-description> - <editor-description> - Re-run common subexpression elimination after loop optimizations - has been performed. - </editor-description> - <logic> - <logic-option-implied-by id="O2"/> - <logic-option-implied-by id="O3"/> - </logic> - </option> - <option id="schedule-insns"> <value>-fschedule-insns</value> --- 146,149 ---- *************** *** 335,415 **** </option> - <option id="strength-reduce"> - <value>-fstrength-reduce</value> - <short-description>Loop optimizations</short-description> - <editor-description> - Perform the optimizations of loop strength reduction and - elimination of iteration variables. - </editor-description> - <logic> - <logic-option-implied-by id="O2"/> - <logic-option-implied-by id="O3"/> - </logic> - </option> - - <option id="thread-jumps"> - <value>-fthread-jumps</value> - <short-description>Jump shortcuts' detection</short-description> - <editor-description> - Perform optimizations where we check to see if a jump branches - to a location where another comparison subsumed by the first is - found. If so, the first branch is redirected to either the - destination of the second branch or a point immediately following - it, depending on whether the condition is known to be true or - false. - </editor-description> - <logic> - <logic-option-implied-by id="O2"/> - <logic-option-implied-by id="O3"/> - </logic> - </option> - - - <option id="unroll-all-loops"> - <value>-funroll-all-loops</value> - <short-description>Global loop unrolling optimization</short-description> - <editor-description> - Perform the optimization of loop unrolling. This is done for - all loops. This usually makes programs run more slowly. - </editor-description> - </option> - - - <option id="unroll-loops"> - <value>-funroll-loops</value> - <short-description>Loop unrolling optimizations</short-description> - <editor-description> - Perform the optimization of loop unrolling. This is only done - for loops whose number of iterations can be determined at com- - pile time or run time. - </editor-description> - </option> - - <option id="m486"> - <value>-m486</value> - <short-description>Generate i486 optimized code</short-description> - <editor-description> - Control whether or not code is optimized for a 486 instead of an - 386. Code generated for a 486 will run on a 386 and vice versa. - </editor-description> - </option> - - - <option id="no-fp-ret-in-387"> - <value>-fno-fp-ret-in-387</value> - <short-description>Do not use FPU to return values</short-description> - <editor-description> - Do not use the FPU registers for return values of functions. - - The usual calling convention has functions return values of - types float and double in an FPU register, even if there is no - FPU. The idea is that the operating system should emulate an - FPU. - - The option `-mno-fp-ret-in-387' causes such values to be - returned in ordinary CPU registers instead. - </editor-description> - </option> - <!-- <option id=""> --- 179,182 ---- Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 22 Mar 2007 19:54:05 -0000 1.2 --- Makefile.am 12 Apr 2007 16:50:36 -0000 1.3 *************** *** 8,17 **** # ----------------------------------------------------------------------------- ! data_DATA = options.xml \ mainopt.xml \ ! arch.xml cse.xml \ ! inline.xml loops.xml \ ! description.xml ! datarootdir=@datarootdir@/compbenchmarks/@VERSION@/KB/gxx/2.95.x --- 8,17 ---- # ----------------------------------------------------------------------------- ! data_DATA = description.xml \ mainopt.xml \ ! arch.xml \ ! cse.xml \ ! inline.xml \ ! loops.xml datarootdir=@datarootdir@/compbenchmarks/@VERSION@/KB/gxx/2.95.x Index: loops.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/loops.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** loops.xml 20 Mar 2007 20:33:16 -0000 1.1 --- loops.xml 12 Apr 2007 16:50:36 -0000 1.2 *************** *** 9,121 **** --> ! <!-- Loop related options for gxx --> ! <!-- included by gxx/options.xml --> ! ! <cel> ! <!-- strength-reduce --> ! <cel-function-def> ! <cel-str>kb-gxx-option-strength-reduce-is-compatible</cel-str> ! ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-cond-if> ! <cel-logic-or> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O2</cel-str> ! </cel-cmp-eq> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O3</cel-str> ! </cel-cmp-eq> ! </cel-logic-or> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-str>option implied by -O2 and -O3</cel-str> ! </cel-var-set> ! </cel-cond-if> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! </cel-function-def> ! <!-- thread-jumps --> ! <cel-function-def> ! <cel-str>kb-gxx-option-thread-jumps-is-compatible</cel-str> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-cond-if> ! <cel-logic-or> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O2</cel-str> ! </cel-cmp-eq> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O3</cel-str> ! </cel-cmp-eq> ! </cel-logic-or> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-str>option implied by -O2 and -O3</cel-str> ! </cel-var-set> ! </cel-cond-if> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! </cel-function-def> - <!-- unroll-all-loops --> - <cel-function-def> - <cel-str>kb-gxx-option-unroll-all-loops-is-compatible</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-function-def> - <!-- unroll-loops --> - <cel-function-def> - <cel-str>kb-gxx-option-unroll-loops-is-compatible</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-function-def> ! </cel> \ No newline at end of file --- 9,66 ---- --> ! <!-- Loops' controling options for 'gxx' (includes gcc and g++) --> ! <options> ! <option id="strength-reduce"> ! <value>-fstrength-reduce</value> ! <short-description>Loop optimizations</short-description> ! <editor-description> ! Perform the optimizations of loop strength reduction and ! elimination of iteration variables. ! </editor-description> ! <logic> ! <logic-option-implied-by id="O2"/> ! <logic-option-implied-by id="O3"/> ! </logic> ! </option> ! <option id="thread-jumps"> ! <value>-fthread-jumps</value> ! <short-description>Jump shortcuts' detection</short-description> ! <editor-description> ! Perform optimizations where we check to see if a jump branches ! to a location where another comparison subsumed by the first is ! found. If so, the first branch is redirected to either the ! destination of the second branch or a point immediately following ! it, depending on whether the condition is known to be true or ! false. ! </editor-description> ! <logic> ! <logic-option-implied-by id="O2"/> ! <logic-option-implied-by id="O3"/> ! </logic> ! </option> ! <option id="unroll-all-loops"> ! <value>-funroll-all-loops</value> ! <short-description>Global loop unrolling optimization</short-description> ! <editor-description> ! Perform the optimization of loop unrolling. This is done for ! all loops. This usually makes programs run more slowly. ! </editor-description> ! </option> ! <option id="unroll-loops"> ! <value>-funroll-loops</value> ! <short-description>Loop unrolling optimizations</short-description> ! <editor-description> ! Perform the optimization of loop unrolling. This is only done ! for loops whose number of iterations can be determined at com- ! pile time or run time. ! </editor-description> ! </option> ! </options> \ No newline at end of file Index: mainopt.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/mainopt.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mainopt.xml 20 Mar 2007 20:33:16 -0000 1.1 --- mainopt.xml 12 Apr 2007 16:50:36 -0000 1.2 *************** *** 9,207 **** --> ! <!-- 'Main optimization' options for gxx --> ! <!-- included by gxx/options.xml --> ! ! <cel> ! <!-- Option related functions --> ! ! <!-- O0 --> ! <cel-function-def> ! <cel-str>kb-gxx-option-O0-is-compatible</cel-str> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-block> ! <cel-stack-push> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-stack-push> ! <cel-stack-push> ! <cel-str>-O0</cel-str> ! </cel-stack-push> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-common-option-apply</cel-str> ! </cel-function-call> ! </cel-var-set> ! </cel-block> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! </cel-function-def> ! ! <!-- Os --> ! <cel-function-def> ! <cel-str>kb-gxx-option-Os-is-compatible</cel-str> ! ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-block> ! <cel-stack-push> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-stack-push> ! <cel-stack-push> ! <cel-str>-Os</cel-str> ! </cel-stack-push> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-common-option-apply</cel-str> ! </cel-function-call> ! </cel-var-set> ! </cel-block> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! </cel-function-def> ! <!-- O1 --> ! <cel-function-def> ! <cel-str>kb-gxx-option-O1-is-compatible</cel-str> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-block> ! <cel-stack-push> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-stack-push> ! <cel-stack-push> ! <cel-str>-O1</cel-str> ! </cel-stack-push> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-common-option-apply</cel-str> ! </cel-function-call> ! </cel-var-set> ! </cel-block> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! </cel-function-def> ! <!-- O2 --> ! <cel-function-def> ! <cel-str>kb-gxx-option-O2-is-compatible</cel-str> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-block> ! <cel-stack-push> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-stack-push> ! <cel-stack-push> ! <cel-str>-O2</cel-str> ! </cel-stack-push> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-common-option-apply</cel-str> ! </cel-function-call> ! </cel-var-set> ! </cel-block> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! </cel-function-def> ! <!-- O3 --> ! <cel-function-def> ! <cel-str>kb-gxx-option-O3-is-compatible</cel-str> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-block> ! <cel-stack-push> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-stack-push> ! <cel-stack-push> ! <cel-str>-O3</cel-str> ! </cel-stack-push> ! <cel-var-set> ! <cel-str>result</cel-str> ! <cel-function-call> ! <cel-str>kb-common-option-apply</cel-str> ! </cel-function-call> ! </cel-var-set> ! </cel-block> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>result</cel-str> ! </cel-var-get> ! </cel-function-def> ! </cel> \ No newline at end of file --- 9,108 ---- --> ! <!-- Global optimization options for 'gxx' (includes gcc and g++) --> + <options> + <option id="O0"> + <value>-O0</value> + <short-description>Globally disable compiler optimization</short-description> + <editor-description> + Do not optimize. This is the default + </editor-description> + <logic> + <logic-option-exclusive on="kb-option-mainoptimization"/> + </logic> + </option> ! <option id="Os"> ! <value>-Os</value> ! <short-description>Globally optimize for size</short-description> ! <editor-description> ! 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 ! If you use multiple -O options, with or without level numbers, the last ! such option is the one that is effective. ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! <logic-flag-set id="alignment-disabled" value="1"/> ! </logic> ! </option> ! <option id="O1"> ! <value>-O1</value> ! <short-description>Global optimization, level 1</short-description> ! <editor-description> ! Optimize. Optimizing compilation takes somewhat more time, and ! a lot more memory for a large function. ! Without `-O', the compiler's goal is to reduce the cost of ! compilation and to make debugging produce the expected results. ! Statements are independent: if you stop the program with a ! breakpoint between statements, you can then assign a new value ! to any variable or change the program counter to any other ! statement in the function and get exactly the results you would ! expect from the source code. ! Without `-O', only variables declared register are allocated in ! registers. The resulting compiled code is a little worse than ! produced by PCC without `-O'. ! With `-O', the compiler tries to reduce code size and execution ! time. ! When you specify `-O', the two options `-fthread-jumps' and ! `-fdefer-pop' are turned on. On machines that have delay slots, ! the `-fdelayed-branch' option is turned on. For those machines ! that can support debugging even without a frame pointer, the ! `-fomit-frame-pointer' option is turned on. On some machines ! other flags may also be turned on. ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! <logic-flag-set id="alignment-disabled" value="0"/> ! </logic> ! </option> ! ! <option id="O2"> ! <value>-O2</value> ! <short-description>Global optimization, level 2</short-description> ! <editor-description> ! Optimize even more than -O1. Nearly all supported optimizations that ! do not involve a space-speed tradeoff are performed. Loop unrolling ! and function inlining are not done, for example. As compared to -O, this ! option increases both compilation time and the performance of the ! generated code. ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! </logic> ! </option> ! <option id="O3"> ! <value>-O3</value> ! <short-description>Global optimization, level 3</short-description> ! <editor-description> ! Optimize yet more. This turns on everything -O2 does, along with also ! turning on -finline-functions. ! </editor-description> ! <logic> ! <logic-option-exclusive on="kb-option-mainoptimization"/> ! </logic> ! </option> ! </options> \ No newline at end of file Index: cse.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx/2.95.x/cse.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cse.xml 20 Mar 2007 20:33:14 -0000 1.1 --- cse.xml 12 Apr 2007 16:50:36 -0000 1.2 *************** *** 9,147 **** --> ! <!-- CSE (common subexpression elimination) related options for gxx --> ! <!-- included by gxx/options.xml --> ! ! <cel> ! <!-- cse-follow-jumps --> ! <cel-function-def> ! <cel-str>kb-gxx-option-cse-follow-jumps-is-compatible</cel-str> ! ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-cond-if> ! <cel-logic-or> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O2</cel-str> ! </cel-cmp-eq> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O3</cel-str> ! </cel-cmp-eq> ! </cel-logic-or> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-str>option implied by -O2 and -O3</cel-str> ! </cel-var-set> ! </cel-cond-if> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! </cel-function-def> ! ! ! <!-- cse-skip-blocks --> ! <cel-function-def> ! <cel-str>kb-gxx-option-cse-skip-blocks-is-compatible</cel-str> ! ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-cond-if> ! <cel-logic-or> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O2</cel-str> ! </cel-cmp-eq> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O3</cel-str> ! </cel-cmp-eq> ! </cel-logic-or> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-str>option implied by -O2 and -O3</cel-str> ! </cel-var-set> ! </cel-cond-if> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! </cel-function-def> ! <!-- rerun-cse-after-loop --> ! <cel-function-def> ! <cel-str>kb-gxx-option-rerun-cse-after-loop-is-compatible</cel-str> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-function-call> ! <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> ! </cel-function-call> ! </cel-var-set> ! <cel-cond-if> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! <cel-str>1</cel-str> ! </cel-cmp-eq> ! <cel-cond-if> ! <cel-logic-or> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O2</cel-str> ! </cel-cmp-eq> ! <cel-cmp-eq> ! <cel-var-get> ! <cel-str>kb-option-mainoptimization</cel-str> ! </cel-var-get> ! <cel-str>-O3</cel-str> ! </cel-cmp-eq> ! </cel-logic-or> ! <cel-var-set> ! <cel-str>return</cel-str> ! <cel-str>option implied by -O2 and -O3</cel-str> ! </cel-var-set> ! </cel-cond-if> ! </cel-cond-if> ! <cel-var-get> ! <cel-str>return</cel-str> ! </cel-var-get> ! </cel-function-def> ! </cel> \ No newline at end of file --- 9,59 ---- --> ! <!-- Common-Subexpression-Elimination options for 'gxx' (includes gcc and g++) --> ! <options> ! <option id="cse-follow-jumps"> ! <value>-fcse-follow-jumps</value> ! <short-description>Always scan through jump instructions in common subexpression elimination</short-description> ! <editor-description> ! In common subexpression elimination, scan through jump instructions ! when the target of the jump is not reached by any other ! path. For example, when CSE encounters an if statement with an else ! clause, CSE will follow the jump when the condition tested ! is false. ! </editor-description> ! <logic> ! <logic-option-implied-by id="O2"/> ! <logic-option-implied-by id="O3"/> ! </logic> ! </option> ! <option id="cse-skip-blocks"> ! <value>-fcse-skip-blocks</value> ! <short-description>Always scan through conditionnal jump instructions in common subexpression elimination</short-description> ! <editor-description> ! This is similar to `-fcse-follow-jumps', but causes CSE to follow ! jumps which conditionally skip over blocks. When CSE encounters ! a simple if statement with no else clause, ! `-fcse-skip-blocks' causes CSE to follow the jump around the ! body of the if. ! </editor-description> ! <logic> ! <logic-option-implied-by id="O2"/> ! <logic-option-implied-by id="O3"/> ! </logic> ! </option> ! <option id="rerun-cse-after-loop"> ! <value>-frerun-cse-after-loop</value> ! <short-description>Re-run CSE after loop optimizations</short-description> ! <editor-description> ! Re-run common subexpression elimination after loop optimizations ! has been performed. ! </editor-description> ! <logic> ! <logic-option-implied-by id="O2"/> ! <logic-option-implied-by id="O3"/> ! </logic> ! </option> ! </options> \ No newline at end of file |
From: Frederic T. <xf...@us...> - 2007-04-11 20:31:20
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30750 Added Files: Compiler-Option-Logic.cpp Compiler-Option-Logic.h Compiler-Version.cpp Compiler-Version.h Log Message: First import. --- NEW FILE: Compiler-Version.cpp --- /* ---------------------------------------------------------------------------- $Id: Compiler-Version.cpp,v 1.1 2007/04/11 20:31:13 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Compiler/Compiler-Version.h> #include <System/System.h> using namespace CBM; CompilerVersion::CompilerVersion(void) { } int CompilerVersion::AsInteger(std::string _version) { int i = 0; int mul = 1; std::string cur; int tmp; int internal = 0; int digits = 0; if (_version.find(".", 0)>0) { while ( (cur=cbmSystem->Split(_version, ".", i))!="") { tmp=atoi(cur.c_str()); internal+=tmp; internal*=100; mul*=100; i++; digits++; } } internal/=100; while (digits<4) { digits+=2; mul*=100; internal*=100; } return(internal); } CompilerVersion::~CompilerVersion() { } --- NEW FILE: Compiler-Option-Logic.h --- /* ---------------------------------------------------------------------------- $Id: Compiler-Option-Logic.h,v 1.1 2007/04/11 20:31:13 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCOMPILER_OPTION_LOGIC #define H_CBMCOMPILER_OPTION_LOGIC 1 #include <Compiler/Compiler-Option-Description.h> namespace CBM { typedef enum CompilerOptionLogicCommandID { Unknown, Exclusive, ImpliedBy, Requires, FlagSet, FlagAssert }; typedef struct CompilerOptionLogicCommand { CompilerOptionLogicCommandID id; std::string argumentOption; std::string extraValue; }; class CompilerOptionLogic { private: protected: CompilerOptionDescriptions *context; CompilerOptionDescription *description; std::vector<CompilerOptionLogicCommand*> commands; public: CompilerOptionLogic(CompilerOptionDescriptions *_context, CompilerOptionDescription *_description, XMLNode *_from); virtual std::string use(void); virtual ~CompilerOptionLogic(); }; } #endif --- NEW FILE: Compiler-Version.h --- /* ---------------------------------------------------------------------------- $Id: Compiler-Version.h,v 1.1 2007/04/11 20:31:13 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCOMPILER_VERSION #define H_CBMCOMPILER_VERSION 1 #include <string> namespace CBM { class CompilerVersion { private: protected: public: CompilerVersion(); virtual int AsInteger(std::string _version); virtual ~CompilerVersion(); }; } #endif --- NEW FILE: Compiler-Option-Logic.cpp --- /* ---------------------------------------------------------------------------- $Id: Compiler-Option-Logic.cpp,v 1.1 2007/04/11 20:31:13 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Compiler/Compiler-Option-Logic.h> #include <Compiler/Compiler.h> using namespace CBM; CompilerOptionLogic::CompilerOptionLogic(CompilerOptionDescriptions *_context, CompilerOptionDescription *_description, XMLNode *_from) { int i; int n = _from->nodeNumber(); CBM::XMLNode *N; CBM::XMLAttribute *A; CompilerOptionLogicCommand *cmd; context=_context; description=_description; for(i=0; i<n; i++) { N=_from->getNode(i); if (N->Name() == "logic-option-exclusive") { A=N->getAttribute("on"); if (!A) continue; cmd=new CompilerOptionLogicCommand; cmd->id=Exclusive; cmd->argumentOption=A->Value(); cmd->extraValue=_description->Id(); commands.push_back(cmd); continue; } if (N->Name() == "logic-option-implied-by") { A=N->getAttribute("id"); if (!A) continue; cmd=new CompilerOptionLogicCommand; cmd->id=ImpliedBy; cmd->argumentOption=A->Value(); cmd->extraValue=""; commands.push_back(cmd); continue; } if (N->Name() == "logic-option-requires") { A=N->getAttribute("id"); if (!A) continue; cmd=new CompilerOptionLogicCommand; cmd->id=Requires; cmd->argumentOption=A->Value(); cmd->extraValue=""; commands.push_back(cmd); continue; } if (N->Name() == "logic-flag-set") { A=N->getAttribute("id"); if (!A) continue; cmd=new CompilerOptionLogicCommand; cmd->id=FlagSet; cmd->argumentOption=A->Value(); A=N->getAttribute("value"); if (!A) cmd->extraValue="0"; else cmd->extraValue=A->Value(); commands.push_back(cmd); continue; } if (N->Name() == "logic-flag-assert") { A=N->getAttribute("id"); if (!A) continue; cmd=new CompilerOptionLogicCommand; cmd->id=FlagAssert; cmd->argumentOption=A->Value(); A=N->getAttribute("value"); if (!A) cmd->extraValue="0"; else cmd->extraValue=A->Value(); commands.push_back(cmd); continue; } } } std::string CompilerOptionLogic::use(void) { int i; int n = commands.size(); CBM::CompilerOptionLogicCommand *cmd; CBM::Compiler *C = context->Compiler(); CBM::CompilerOptionLogicFlag *flag; CBM::CompilerOptionLogicVar *var; std::string tmp; for(i=0; i<n; i++) { cmd=commands[i]; switch(cmd->id) { case Exclusive: var=C->colVarGet(cmd->argumentOption); if (!var) { C->colVarSet(cmd->argumentOption, cmd->extraValue); } else { if (var->value!=cmd->extraValue) { tmp="Option "; tmp+=context->Description(cmd->extraValue)->Option(), tmp+=" is incompatible with "; tmp+=context->Description(var->value)->Option(); return(tmp); } } break; case ImpliedBy: if (C->colOptionHas(cmd->argumentOption)) { tmp="Option "; tmp+=description->Option(); tmp+=" is implied by "; tmp+=context->Description(cmd->argumentOption)->Option(); return(tmp); } break; case Requires: if (!C->colOptionHas(cmd->argumentOption)) { tmp="Option "; tmp+=description->Option(); tmp+=" requieres "; tmp+=context->Description(cmd->argumentOption)->Option(); return(tmp); } break; case FlagSet: C->colFlagSet(cmd->argumentOption, cmd->extraValue); break; case FlagAssert: flag=C->colFlagGet(cmd->argumentOption); if ((!flag) && (cmd->extraValue=="0")) return("1"); if (((flag) && (flag->value!=cmd->extraValue)) || (!flag)) { tmp="Check failed : "; tmp+=context->Description(cmd->argumentOption)->Option(); tmp+=" must be "; tmp+=cmd->extraValue; if (flag) { tmp+=" (has "; tmp+=flag->value; tmp+=")"; } else { tmp+=" (not defined)"; } return(tmp); } break; default: return("Unknown command in option analyzing"); break; } } return("1"); } CompilerOptionLogic::~CompilerOptionLogic() { } |
From: Frederic T. <xf...@us...> - 2007-04-11 20:30:23
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30328 Modified Files: compilers.pl Log Message: Updated interface. Index: compilers.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib/compilers.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** compilers.pl 10 Apr 2007 17:39:50 -0000 1.1 --- compilers.pl 11 Apr 2007 20:30:18 -0000 1.2 *************** *** 39,48 **** #'compiler-fake-gcc-4.1.1-13' => 'gcc-3.0.x', 'compiler-fake-gcc-2.95.3' => 'gcc-2.95.x', ! #'compiler-fake-g++-2.95.3' => 'g++-2.95.x' ); # This uses previous hash's keys to make test order deterministic. # ! our @COMPILER_FAKE_INTERFACES = ('compiler-fake-gcc-2.95.3'); # Following hashs declare known options (in regard of CompBenchmarks XML --- 39,50 ---- #'compiler-fake-gcc-4.1.1-13' => 'gcc-3.0.x', 'compiler-fake-gcc-2.95.3' => 'gcc-2.95.x', ! # 'compiler-fake-g++-2.95.3' => 'g++-2.95.x' ); # This uses previous hash's keys to make test order deterministic. # ! our @COMPILER_FAKE_INTERFACES = ('compiler-fake-gcc-2.95.3', ! # 'compiler-fake-g++-2.95.3' ! ); # Following hashs declare known options (in regard of CompBenchmarks XML *************** *** 59,87 **** my %COMPILER_FAKE_OPTIONS_GXX_295x = ( ! 'O0' => ('sets-variable kb-option-mainoptimization'), ! 'Os' => ('sets-variable kb-option-mainoptimization'), ! 'O1' => ('sets-variable kb-option-mainoptimization'), ! 'O2' => ('sets-variable kb-option-mainoptimization'), ! 'O3' => ('sets-variable kb-option-mainoptimization'), ! 'caller-save' => ('implied-by O2'), ! 'cse-follow-jumps' => ('implied-by O2'), ! 'cse-skip-blocks' => ('implied-by O2'), ! 'delayed-branch' => ('implied-by O2'), ! 'expensive-optimizations' => ('implied-by O2'), ! 'fast-math' => ('nop'), ! 'float-store' => ('implied-by O2'), ! 'force-addr' => ('implied-by O2'), ! 'force-mem' => ('implied-by O2'), ! 'inline-functions' => ('implied-by O3'), ! 'omit-frame-pointer' => ('nop'), ! 'rerun-cse-after-loop' => ('implied-by O2'), ! 'schedule-insns' => ('implied-by O2'), ! 'schedule-insns2' => ('implied-by O2'), ! 'strength-reduce' => ('implied-by O2'), ! 'thread-jumps' => ('implied-by O2'), ! 'unroll-all-loops' => ('nop'), ! 'unroll-loops' => ('nop'), ! 'm486' => ('nop'), # !!! ! 'no-fp-ret-in-387' => ('nop'), # !!!? ); --- 61,89 ---- my %COMPILER_FAKE_OPTIONS_GXX_295x = ( ! 'O0' => ['set-variable kb-option-mainoptimization'], ! 'Os' => ['set-variable kb-option-mainoptimization'], ! 'O1' => ['set-variable kb-option-mainoptimization'], ! 'O2' => ['set-variable kb-option-mainoptimization'], ! 'O3' => ['set-variable kb-option-mainoptimization'], ! 'caller-save' => ['nop'], ! 'cse-follow-jumps' => ['implied-by O2 O3'], ! 'cse-skip-blocks' => ['implied-by O2 O3'], ! 'delayed-branch' => ['implied-by O2 O3'], ! 'expensive-optimizations' => ['implied-by O2 O3'], ! 'fast-math' => ['nop'], ! 'float-store' => ['implied-by O2 O3'], ! 'force-addr' => ['implied-by O2 O3'], ! 'force-mem' => ['implied-by O2 O3'], ! 'inline-functions' => ['implied-by O3'], ! 'omit-frame-pointer' => ['nop'], ! 'rerun-cse-after-loop' => ['implied-by O2 O3'], ! 'schedule-insns' => ['implied-by O2 O3'], ! 'schedule-insns2' => ['implied-by O2 O3'], ! 'strength-reduce' => ['implied-by O2 O3'], ! 'thread-jumps' => ['implied-by O2 O3'], ! 'unroll-all-loops' => ['nop'], ! 'unroll-loops' => ['nop'], ! 'm486' => ['nop'], # !!! ! 'no-fp-ret-in-387' => ['nop'], # !!!? ); *************** *** 89,93 **** ( 'gcc-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x, ! # 'gxx-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x ); --- 91,95 ---- ( 'gcc-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x, ! # 'g++-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x ); *************** *** 99,101 **** --- 101,114 ---- return(@o+0); } + + sub compiler_option_litteral { + my $C = shift; + my $oid = shift; + + my $OD = $C->OptionDescriptions(); + my $D = $OD->Description($oid); + + return($D->Option()); + } + 1; |