Changeset 14511 in project for chicken


Ignore:
Timestamp:
04/30/09 12:15:46 (10 years ago)
Author:
felix winkelmann
Message:

global-inlining fixes (for problems reported by Jim Ursetto)

Location:
chicken/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/batch-driver.scm

    r13858 r14511  
    6464  default-declarations units-used-by-default words-per-flonum default-debugging-declarations
    6565  default-profiling-declarations default-optimization-passes
    66   file-requirements import-libraries inline-globally
     66  file-requirements import-libraries inline-globally enable-inline-files
    6767  foreign-string-result-reserve parameter-limit eq-inline-operator optimizable-rest-argument-operators
    6868  membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
     
    502502                 (end-time "user pass") ) )
    503503
    504              (let ((req (concatenate (vector->list file-requirements))))
    505                (when (debugging 'M "; requirements:")
    506                  (pp req))
    507                (when inline-globally
    508                  (for-each
    509                   (lambda (id)
    510                     (and-let* ((ifile (##sys#resolve-include-filename
    511                                        (make-pathname #f (symbol->string id) "inline")
    512                                        #f #t))
    513                                ((file-exists? ifile)))
    514                       (dribble "Loading inline file ~a ..." ifile)
    515                       (load-inline-file ifile)))
    516                   (concatenate (map cdr req)))))
    517 
    518504             (let* ([node0 (make-node
    519505                            'lambda '(())
     
    546532                 (set! first-analysis #t) )
    547533
     534               (let ((req (concatenate (vector->list file-requirements))))
     535                 (when (debugging 'M "; requirements:")
     536                   (pp req))
     537                 (when enable-inline-files
     538                   (for-each
     539                    (lambda (id)
     540                      (and-let* ((ifile (##sys#resolve-include-filename
     541                                         (make-pathname #f (symbol->string id) "inline")
     542                                         #f #t))
     543                                 ((file-exists? ifile)))
     544                        (dribble "Loading inline file ~a ..." ifile)
     545                        (load-inline-file ifile)))
     546                    (concatenate (map cdr req)))))
     547
    548548               (set! ##sys#line-number-database #f)
    549549               (set! constant-table #f)
  • chicken/trunk/compiler.scm

    r14474 r14511  
    294294  membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    295295  make-random-name final-foreign-type real-name-table real-name set-real-name! safe-globals-flag
    296   location-pointer-map literal-rewrite-hook inline-globally
     296  location-pointer-map literal-rewrite-hook inline-globally enable-inline-files
    297297  local-definitions export-variable variable-mark intrinsic?
    298298  undefine-shadowed-macros process-lambda-documentation emit-syntax-trace-info
     
    375375(define inline-locally #f)
    376376(define inline-output-file #f)
     377(define enable-inline-files #f)
    377378
    378379
     
    13951396                    (set! extended-bindings (lset-difference eq? default-extended-bindings syms)) ) ] ) ]
    13961397          ((inline-global)
     1398           (set! enable-inline-files #t)
    13971399           (if (null? (cddr spec))
    13981400               (set! inline-globally #f)
     
    14731475                (stripa (cdr spec))))))
    14741476       ((inline-global)
     1477        (set! enable-inline-files #t)
     1478        (set! inline-locally #t)
    14751479        (if (null? (cdr spec))
    14761480            (set! inline-globally #t)
  • chicken/trunk/manual/Declarations

    r13683 r14511  
    149149in the current compilation unit.
    150150
     151Enabling global inlining implies {{(declare (inline))}}.
     152
    151153
    152154=== inline-limit
  • chicken/trunk/manual/Using the compiler

    r13713 r14511  
    122122; -inline : Enable procedure inlining for known procedures of a size below the threshold (which can be set through the {{-inline-limit}} option).
    123123
    124 ; -inline-global : Enable cross-module inlining (in addition to local inlining).
     124; -inline-global : Enable cross-module inlining (in addition to local inlining). Implies {{-inline}}. For more information, see also [[Declarations]].
    125125
    126126; -inline-limit THRESHOLD : Sets the maximum size of a potentially inlinable procedure. The default threshold is {{20}}.
Note: See TracChangeset for help on using the changeset viewer.