[Compbench-devel] CompBenchmarks++/CBM-PI/t/lib compilers.pl, NONE, 1.1
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-04-10 17:39:56
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/lib In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3761 Added Files: compilers.pl Log Message: First import. --- NEW FILE: compilers.pl --- # ----------------------------------------------------------------------------- # $Id: compilers.pl,v 1.1 2007/04/10 17:39:50 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; # This little script keeps track of all supported compilers and options # It should be updated whenever : # * a compiler is added, [search for TASKCOMP in this file] # * or when related options get modified [search for TASKOPTS] # Adding or managing compilers [ TASKSCOMP ] # # Hash associates a pseudo-compiler with the nearest CompBenchmarks supported # compiler branch. # # * First ensure that pseudo-compiler corresponds to a (shell) script that # returns a string as the original compiler on a given version would do if # queried for its version. # # * Next fill up associative hash. The nearset supported branch is of the # form $compiler_id-$compiler_branch, where $compiler_id is as is one # returned by CBM::Compiler's Id() method. The compiler branch is self # explanatory, but MUST ends with $major.$minor.x , with a litteral ending # x. Other accepted form for branch is $major.$minor.$patch_version.x . # # When this is OK, you may want to : # * Update @COMPILER_FAKE_INTERFACE # * Update options [see TASKOPTS]. our %COMPILER_FAKE_INTERFACES = ( #'compiler-fake-gcc-3.2.3-20-rh' => 'gcc-3.0.x', #'compiler-fake-g++-4.1.1-13' => 'g++-3.0.x', #'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 # knowledge base). [TASKOPTS] # # They're used to : # * Track recognized option number for each compiler and compiler's version # * Validate constraints given on options through XML KB. # # To keep things works, maintainers should : # * Update XML KB with new options or parameters # * Reflect changes and tests there : # 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'), # !!!? ); our %COMPILER_FAKE_OPTIONS = ( 'gcc-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x, # 'gxx-2.95.x' => \%COMPILER_FAKE_OPTIONS_GXX_295x ); sub compiler_option_number_expected { my $compiler_and_branch = shift; my @o = keys %{$COMPILER_FAKE_OPTIONS{$compiler_and_branch}}; return(@o+0); } 1; |