Changeset ef22ad6


Ignore:
Timestamp:
Aug 23, 2019, 6:52:14 AM (2 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
bbb1b35
Parents:
2c60af75 (diff), 5d00425 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

deal with conflicts

Files:
16 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r2c60af75 ref22ad6  
    132132
    133133<img src="https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/plot/Compilation/getPlot?index=0" >
     134<img src="https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/plot/Compilation/getPlot?index=1" >
    134135
    135136<p>- Logs ----------------------------------------------------------------</p>
  • Jenkinsfile

    r2c60af75 ref22ad6  
    197197                if( Settings.Publish && !Settings.RunBenchmark ) { echo 'No results to publish!!!' }
    198198
    199                 def groupCompile = new PlotGroup('Compilation', 'seconds', true)
    200                 def groupConcurrency = new PlotGroup('Concurrency', 'nanoseconds', false)
     199                def groupCompile = new PlotGroup('Compilation', 'duration (s) - lower is better', true)
     200                def groupConcurrency = new PlotGroup('Concurrency', 'duration (n) - lower is better', false)
    201201
    202202                //Then publish the results
    203                 do_plot(Settings.RunBenchmark && Settings.Publish, 'compile'       , groupCompile    , 'Compilation')
    204                 do_plot(Settings.RunBenchmark && Settings.Publish, 'compile.diff'  , groupCompile    , 'Compilation Speed-Up')
    205                 do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch'     , groupConcurrency, 'Context Switching')
    206                 do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch.diff', groupConcurrency, 'Context Switching Speed-Up')
    207                 do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex'         , groupConcurrency, 'Mutual Exclusion')
    208                 do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex.diff'    , groupConcurrency, 'Mutual Exclusion Speed-Up')
    209                 do_plot(Settings.RunBenchmark && Settings.Publish, 'signal'        , groupConcurrency, 'Internal and External Scheduling')
    210                 do_plot(Settings.RunBenchmark && Settings.Publish, 'signal.diff'   , groupConcurrency, 'Internal and External Scheduling Speed-Up')
     203                do_plot(Settings.RunBenchmark && Settings.Publish, 'compile'       , groupCompile    , false, 'Compilation')
     204                do_plot(Settings.RunBenchmark && Settings.Publish, 'compile.diff'  , groupCompile    , true , 'Compilation (relative)')
     205                do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch'     , groupConcurrency, false, 'Context Switching')
     206                do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch.diff', groupConcurrency, true , 'Context Switching (relative)')
     207                do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex'         , groupConcurrency, false, 'Mutual Exclusion')
     208                do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex.diff'    , groupConcurrency, true , 'Mutual Exclusion (relative)')
     209                do_plot(Settings.RunBenchmark && Settings.Publish, 'signal'        , groupConcurrency, false, 'Internal and External Scheduling')
     210                do_plot(Settings.RunBenchmark && Settings.Publish, 'signal.diff'   , groupConcurrency, true , 'Internal and External Scheduling (relative)')
    211211        }
    212212}
     
    466466}
    467467
    468 def do_plot(boolean new_data, String file, PlotGroup group, String title) {
     468def do_plot(boolean new_data, String file, PlotGroup group, boolean relative, String title) {
    469469
    470470        if(new_data) {
     
    489489                        exclZero: false,
    490490                        keepRecords: false,
    491                         logarithmic: group.log,
     491                        logarithmic: !relative && group.log,
    492492                        numBuilds: '120',
    493493                        useDescr: true,
  • libcfa/src/Makefile.am

    r2c60af75 ref22ad6  
    2626VPATH += :../prelude
    2727
     28gdbwaittarget=""
     29
    2830# AM_CFLAGS for all cfa source
    2931# AM_CFAFLAGS for only cfa source
    3032# use -no-include-stdhdr to prevent rebuild cycles
    3133# The built sources must not depend on the installed headers
    32 AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
     34AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb)  @CONFIG_CFAFLAGS@
    3335AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3436AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
  • libcfa/src/Makefile.in

    r2c60af75 ref22ad6  
    435435am__v_UPP_1 =
    436436lib_LTLIBRARIES = libcfa.la libcfathread.la
     437gdbwaittarget = ""
    437438
    438439# AM_CFLAGS for all cfa source
     
    440441# use -no-include-stdhdr to prevent rebuild cycles
    441442# The built sources must not depend on the installed headers
    442 AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
     443AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb)  @CONFIG_CFAFLAGS@
    443444AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    444445AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
  • src/ResolvExpr/AlternativeFinder.cc

    r2c60af75 ref22ad6  
    11881188                assert( toType );
    11891189                toType = resolveTypeof( toType, indexer );
     1190                assert(!dynamic_cast<TypeofType *>(toType));
    11901191                SymTab::validateType( toType, &indexer );
    11911192                adjustExprType( toType, env, indexer );
  • src/SynTree/ApplicationExpr.cc

    r2c60af75 ref22ad6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Apr 26 12:41:06 2016
    13 // Update Count     : 4
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Mon Aug 12 14:28:00 2019
     13// Update Count     : 5
    1414//
    1515
     
    7676}
    7777
     78bool ApplicationExpr::get_lvalue() const {
     79        return result->get_lvalue();
     80}
     81
    7882void ApplicationExpr::print( std::ostream &os, Indenter indent ) const {
    7983        os << "Application of" << std::endl << indent+1;
  • src/SynTree/CommaExpr.cc

    r2c60af75 ref22ad6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon May 02 15:19:44 2016
    13 // Update Count     : 1
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Mon Arg 12 16:11:00 2016
     13// Update Count     : 2
    1414//
    1515
     
    3939}
    4040
     41bool CommaExpr::get_lvalue() const {
     42        // xxx - as above, shouldn't be an lvalue but that information is used anyways.
     43        return result->get_lvalue();
     44}
     45
    4146void CommaExpr::print( std::ostream &os, Indenter indent ) const {
    4247        os << "Comma Expression:" << std::endl;
  • src/SynTree/Expression.cc

    r2c60af75 ref22ad6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Aug  7 17:03:00 2019
    13 // Update Count     : 62
     12// Last Modified On : Thr Aug 15 13:43:00 2019
     13// Update Count     : 64
    1414//
    1515
     
    6464
    6565bool Expression::get_lvalue() const {
    66         return result->get_lvalue();
     66        assert( !result->get_lvalue() );
     67        return false;
    6768}
    6869
     
    138139}
    139140
     141bool VariableExpr::get_lvalue() const {
     142        return result->get_lvalue();
     143}
     144
    140145VariableExpr * VariableExpr::functionPointer( FunctionDecl * func ) {
    141146        VariableExpr * funcExpr = new VariableExpr( func );
     
    269274CastExpr::~CastExpr() {
    270275        delete arg;
     276}
     277
     278bool CastExpr::get_lvalue() const {
     279        return result->get_lvalue();
    271280}
    272281
     
    380389        // don't delete the member declaration, since it points somewhere else in the tree
    381390        delete aggregate;
     391}
     392
     393bool MemberExpr::get_lvalue() const {
     394        assert( result->get_lvalue() );
     395        return true;
    382396}
    383397
     
    432446}
    433447
     448bool UntypedExpr::get_lvalue() const {
     449        return result->get_lvalue();
     450}
    434451
    435452void UntypedExpr::print( std::ostream & os, Indenter indent ) const {
     
    490507        delete arg2;
    491508        delete arg3;
     509}
     510
     511bool ConditionalExpr::get_lvalue() const {
     512        return result->get_lvalue();
    492513}
    493514
     
    548569}
    549570
     571bool ConstructorExpr::get_lvalue() const {
     572        return result->get_lvalue();
     573}
     574
    550575void ConstructorExpr::print( std::ostream & os, Indenter indent ) const {
    551576        os <<  "Constructor Expression: " << std::endl << indent+1;
     
    565590CompoundLiteralExpr::~CompoundLiteralExpr() {
    566591        delete initializer;
     592}
     593
     594bool CompoundLiteralExpr::get_lvalue() const {
     595        assert( result->get_lvalue() );
     596        return true;
    567597}
    568598
     
    616646                result = new VoidType( Type::Qualifiers() );
    617647        }
     648}
     649bool StmtExpr::get_lvalue() const {
     650        return result->get_lvalue();
    618651}
    619652void StmtExpr::print( std::ostream & os, Indenter indent ) const {
  • src/SynTree/Expression.h

    r2c60af75 ref22ad6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Aug  7 16:56:00 2019
    13 // Update Count     : 51
     12// Last Modified On : Thr Aug 15 13:46:00 2019
     13// Update Count     : 54
    1414//
    1515
     
    7171        const Type * get_result() const { return result; }
    7272        void set_result( Type * newValue ) { result = newValue; }
    73         bool get_lvalue() const;
     73        virtual bool get_lvalue() const;
    7474
    7575        TypeSubstitution * get_env() const { return env; }
     
    9999        virtual ~ApplicationExpr();
    100100
     101        bool get_lvalue() const final;
     102
    101103        Expression * get_function() const { return function; }
    102104        void set_function( Expression * newValue ) { function = newValue; }
     
    121123        UntypedExpr( const UntypedExpr & other );
    122124        virtual ~UntypedExpr();
     125
     126        bool get_lvalue() const final;
    123127
    124128        Expression * get_function() const { return function; }
     
    209213        virtual ~CastExpr();
    210214
     215        bool get_lvalue() const final;
     216
    211217        Expression * get_arg() const { return arg; }
    212218        void set_arg( Expression * newValue ) { arg = newValue; }
     
    292298        virtual ~MemberExpr();
    293299
     300        bool get_lvalue() const final;
     301
    294302        DeclarationWithType * get_member() const { return member; }
    295303        void set_member( DeclarationWithType * newValue ) { member = newValue; }
     
    314322        VariableExpr( const VariableExpr & other );
    315323        virtual ~VariableExpr();
     324
     325        bool get_lvalue() const final;
    316326
    317327        DeclarationWithType * get_var() const { return var; }
     
    501511        virtual ~ConditionalExpr();
    502512
     513        bool get_lvalue() const final;
     514
    503515        Expression * get_arg1() const { return arg1; }
    504516        void set_arg1( Expression * newValue ) { arg1 = newValue; }
     
    525537        virtual ~CommaExpr();
    526538
     539        bool get_lvalue() const final;
     540
    527541        Expression * get_arg1() const { return arg1; }
    528542        void set_arg1( Expression * newValue ) { arg1 = newValue; }
     
    611625        ~ConstructorExpr();
    612626
     627        bool get_lvalue() const final;
     628
    613629        Expression * get_callExpr() const { return callExpr; }
    614630        void set_callExpr( Expression * newValue ) { callExpr = newValue; }
     
    629645        CompoundLiteralExpr( const CompoundLiteralExpr & other );
    630646        virtual ~CompoundLiteralExpr();
     647
     648        bool get_lvalue() const final;
    631649
    632650        Initializer * get_initializer() const { return initializer; }
     
    687705        virtual ~TupleExpr();
    688706
     707        bool get_lvalue() const final;
     708
    689709        std::list<Expression*>& get_exprs() { return exprs; }
    690710
     
    705725        TupleIndexExpr( const TupleIndexExpr & other );
    706726        virtual ~TupleIndexExpr();
     727
     728        bool get_lvalue() const final;
    707729
    708730        Expression * get_tuple() const { return tuple; }
     
    754776        StmtExpr( const StmtExpr & other );
    755777        virtual ~StmtExpr();
     778
     779        bool get_lvalue() const final;
    756780
    757781        CompoundStmt * get_statements() const { return statements; }
  • src/SynTree/TupleExpr.cc

    r2c60af75 ref22ad6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 17 09:42:29 2017
    13 // Update Count     : 3
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug 14 14:34:00 2019
     13// Update Count     : 5
    1414//
    1515
     
    5757}
    5858
     59bool TupleExpr::get_lvalue() const {
     60        return result->get_lvalue();
     61}
     62
    5963void TupleExpr::print( std::ostream &os, Indenter indent ) const {
    6064        os << "Tuple:" << std::endl;
     
    7680TupleIndexExpr::~TupleIndexExpr() {
    7781        delete tuple;
     82}
     83
     84bool TupleIndexExpr::get_lvalue() const {
     85        assert( result->get_lvalue() );
     86        return true;
    7887}
    7988
  • src/main.cc

    r2c60af75 ref22ad6  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 22 13:06:18 2019
    13 // Update Count     : 605
     12// Last Modified On : Fri Aug 23 06:50:08 2019
     13// Update Count     : 607
    1414//
    1515
     
    1717#include <execinfo.h>                       // for backtrace, backtrace_symbols
    1818#include <getopt.h>                         // for no_argument, optind, geto...
    19 #include <signal.h>                         // for signal, SIGABRT, SIGSEGV
    2019#include <cassert>                          // for assertf
    2120#include <cstdio>                           // for fopen, FILE, fclose, stdin
    2221#include <cstdlib>                          // for exit, free, abort, EXIT_F...
     22#include <csignal>                         // for signal, SIGABRT, SIGSEGV
    2323#include <cstring>                          // for index
    2424#include <fstream>                          // for ofstream
     
    9696DeclarationNode * parseTree = nullptr;                                  // program parse tree
    9797
     98static bool waiting_for_gdb = false;                                    // flag to set cfa-cpp to wait for gdb on start
     99
    98100static std::string PreludeDirector = "";
    99101
     
    167169} // sigAbortHandler
    168170
    169 
    170171int main( int argc, char * argv[] ) {
    171172        FILE * input;                                                                           // use FILE rather than istream because yyin is FILE
     
    184185        parse_cmdline( argc, argv );                                            // process command-line arguments
    185186        CodeGen::FixMain::setReplaceMain( !nomainp );
     187
     188        if ( waiting_for_gdb ) {
     189                std::cerr << "Waiting for gdb" << std::endl;
     190                std::cerr << "run :" << std::endl;
     191                std::cerr << "  gdb attach " << getpid() << std::endl;
     192                raise(SIGSTOP);
     193        } // if
    186194
    187195        try {
     
    445453        { "statistics", required_argument, nullptr, 'S' },
    446454        { "tree", no_argument, nullptr, 't' },
     455        { "gdb", no_argument, nullptr, 'g' },
    447456        { "", no_argument, nullptr, 0 },                                        // -w
    448457        { "", no_argument, nullptr, 0 },                                        // -W
     
    462471        "<directory> prelude directory for debug/nodebug",      // no flag
    463472        "<option-list> enable profiling information:\n          counters,heap,time,all,none", // -S
    464         "build in tree",                                                                        // -t
     473        "building cfa standard lib",                                                                    // -t
     474        "wait for gdb to attach",                                                                       // -g
    465475        "",                                                                                                     // -w
    466476        "",                                                                                                     // -W
     
    572582                        Stats::parse_params( optarg );
    573583                        break;
    574                   case 't':                                                                             // build in tree
     584                  case 't':                                                                             // building cfa stdlib
    575585                        treep = true;
     586                        break;
     587                  case 'g':                                                                             // wait for gdb
     588                        waiting_for_gdb = true;
    576589                        break;
    577590                  case 'w':                                                                             // suppress all warnings, hidden
  • tests/Makefile.am

    r2c60af75 ref22ad6  
    2222debug=yes
    2323installed=no
     24archiveerrors=
    2425
    2526INSTALL_FLAGS=-in-tree
     
    5657#----------------------------------------------------------------------------------------------------------------
    5758all-local :
    58         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
     59        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    5960
    6061all-tests :
    61         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     62        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    6263
    6364clean-local :
  • tests/Makefile.in

    r2c60af75 ref22ad6  
    377377debug = yes
    378378installed = no
     379archiveerrors =
    379380INSTALL_FLAGS = -in-tree
    380381DEBUG_FLAGS = -debug -O0
     
    770771#----------------------------------------------------------------------------------------------------------------
    771772all-local :
    772         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
     773        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    773774
    774775all-tests :
    775         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     776        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    776777
    777778clean-local :
  • tests/pybin/settings.py

    r2c60af75 ref22ad6  
    44from . import tools
    55
     6global original_path
     7
    68try :
     9        original_path = os.getcwd()
    710        testpath = os.path.dirname(os.path.abspath(os.path.join(os.getcwd(), sys.argv[0])))
    811        sys.path.append(testpath)
     
    113116        global timeout
    114117        global output_width
     118        global archive
    115119
    116120        dry_run      = options.dry_run
     
    122126        timeout      = Timeouts(options.timeout, options.global_timeout)
    123127        output_width = 24
     128        archive      = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None
    124129
    125130
  • tests/pybin/tools.py

    r2c60af75 ref22ad6  
    22import argparse
    33import contextlib
     4import datetime
    45import fileinput
    56import multiprocessing
     
    273274################################################################################
    274275
     276def pretty_now():
     277        ts = time.time()
     278        print(ts, file=sys.stderr)
     279        return datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d_%H:%M:%S')
     280
    275281# check if arguments is yes or no
    276282def yes_no(string):
     
    304310        return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output=subprocess.PIPE)
    305311
     312def core_archive(dst, name, exe):
     313        # Get the files to copy
     314        core = os.path.join(os.getcwd(), "core" )
     315
     316        # Uncomment if we want timestamps on coredumps
     317        # dst  = os.path.join(dst, "%s_%s" % (name, pretty_now()))
     318
     319        # make a directory for this test
     320        mkdir(os.path.join(dst, "dir"))
     321
     322        # moves the files
     323        mv( core, os.path.join(dst, "core" ) )
     324        mv( exe , os.path.join(dst, name   ) )
     325
     326        # return explanatory test
     327        return "Archiving %s (executable and core) to %s" % (os.path.relpath(exe, settings.BUILDDIR), os.path.relpath(dst, settings.original_path))
     328
    306329class Timed:
    307330    def __enter__(self):
  • tests/test.py

    r2c60af75 ref22ad6  
    9191        parser.add_argument('--all', help='Run all test available', action='store_true')
    9292        parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true')
     93        parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='')
    9394        parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int)
    9495        parser.add_argument('--list-comp', help='List all valide arguments', action='store_true')
     
    179180                        error = error + info if error else info
    180181
     182                        if settings.archive:
     183                                error = error + '\n' + core_archive(settings.archive, test.target(), exe_file)
     184
    181185
    182186
     
    295299        # users may want to simply list the tests
    296300        if options.list_comp :
    297                 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --install --timeout --global-timeout -j --jobs ", end='')
     301                print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --archive-errors --install --timeout --global-timeout -j --jobs ", end='')
    298302                print(" ".join(map(lambda t: "%s" % (t.target()), tests)))
    299303
Note: See TracChangeset for help on using the changeset viewer.