Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (706 - 708 of 1030)

Ticket Resolution Summary Owner Reporter
#1269 fixed Lambdas don't optimize Gary Byers Shannon Spires
Description

Optimization works on defun forms like the following:

(defun fptest1 (a b)
  (declare (optimize (speed 3) (safety 1) (debug 1))
           (single-float a b))
  (+ a b))

(disassemble 'fptest1)

We can see from the disassembly that it's using the addss* instruction and not calling .SPBUILTIN-PLUS, so we know the optimization is happening.

[*addss is X86. The ARM equivalent is fadds.]

But lambda forms like the following don't optimize in CCL:

(defun fptest8 ()
  (declare (optimize (speed 3) (safety 0) (debug 0)))
  (lambda (a b)
    (declare (optimize (speed 3) (safety 0) (debug 0))
             (single-float a b))
    (+ a b)))

(disassemble (fptest8))

Because the disassembly contains the telltale line (jmpq (@ .SPBUILTIN-PLUS)), we know that optimization isn't happening.

However, the following works:

(defparameter fptest14
        (lambda (a b)
          (declare (optimize (speed 3) (safety 1) (debug 1))
                   (single-float a b))
          (+ a b)))

(disassemble fptest14)

As you can see, the resulting disassembly has no call to .SPBUILTIN-PLUS but rather it calls (addss (% fp1) (% fp0)), indicating optimization is happening. So using a global variable rather than a defun seems to be a partial workaround for anonymous functions, but not closures.

#1270 fixed compiler error referring to "comples", maybe typo for "complex" Mark David
Description

Do not have a minimal way to reproduce this, but when I did an unusual (for our team) compiler optimization, namely

(proclaim '(optimize (speed 3) (safety 0)))

I got this error when compiling:

Error:

    Unknown vinsn: CCL::GET-COMPLES-SINGLE-FLOAT
       [Condition of type SIMPLE-ERROR]

In:
    Backtrace:
      0: (CCL::NEED-VINSN-TEMPLATE CCL::GET-COMPLES-SINGLE-FLOAT #<HASH-TABLE :TEST EQ size 580/687 #x3020001CB97D>)

Robert Smith grepped for "comples" and found these hits in the sources:

compiler/reg.lisp:(defconstant hard-reg-class-fpr-type-comples-double-float 2)
compiler/X86/x862.lisp:                    (! get-comples-single-float reg result-reg)
compiler/X86/x862.lisp:                 (! get-comples-double-float reg result-reg)

Perhaps this shows a simple typo (comples for complex) and would be enough to at least fix something or figure out the error we're seeing.

#1273 fixed bug with inlining/bignums/type declarations Jared Davis
Description

Hi,

This looks like a bug -- can you reproduce?

I am using CCL version 1.11-dev-r16355M-trunk, built just now on Linux, X86-64.

(declaim (inline part-select-width-low
                 part-select-low-high))

(defun part-select-width-low (x width low)
    (logand (1- (ash 1 width))
            (ash x (- low))))

(defun part-select-low-high (x low high)
    (part-select-width-low x (+ 1 (- high low)) low))

(defun fpreg->rawexpt (x)
  (declare (type (unsigned-byte 80) x))
  (part-select-low-high x 64 78))

(list :wrapper (fpreg->rawexpt (1- (expt 2 80)))
      :direct  (part-select-low-high (1- (expt 2 80)) 64 78))

Expected result: (:WRAPPER 32767 :DIRECT 32767)

Actual result: varies, examples shown below:

;; ? (list :wrapper (fpreg->rawexpt (1- (expt 2 80)))
;;         :direct  (part-select-low-high (1- (expt 2 80)) 64 78))
;; (:WRAPPER 13483 :DIRECT 32767)
;;
;; ? (list :wrapper (fpreg->rawexpt (1- (expt 2 80)))
;;         :direct  (part-select-low-high (1- (expt 2 80)) 64 78))
;; (:WRAPPER 12543 :DIRECT 32767)
;;
;; ? (list :wrapper (fpreg->rawexpt (1- (expt 2 80)))
;;         :direct  (part-select-low-high (1- (expt 2 80)) 64 78))
;; (:WRAPPER 11675 :DIRECT 32767)
;;
;; ? (list :wrapper (fpreg->rawexpt (1- (expt 2 80)))
;;         :direct  (part-select-low-high (1- (expt 2 80)) 64 78))
;; (:WRAPPER 10807 :DIRECT 32767)
;;
;; ? (list :wrapper (fpreg->rawexpt (1- (expt 2 80)))
;;         :direct  (part-select-low-high (1- (expt 2 80)) 64 78))
;; (:WRAPPER 9939 :DIRECT 32767)
;;
;; ...

Thanks!

Jared

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.