[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A whole bunch of bug reports and patches



>That should already be happening.  Please send any examples that don't
>work.  The representation selection phase decides to use either a
>descriptor or a non-descriptor representation (but not both) on the basis
>of a cost minimization heuristic.  There may well be some glitches in the
>heuristic, but it seems to work for these simple examples (at least when I
>tried it on the PMAX; SPARC shouldn't be any different.)
>
>  Rob

It doesn't seem to do it for most examples I can think of on the Sparc:

====================================================================
CMU Common Lisp 15a, running on pollux
Hemlock 3.5 (15a), Python 1.0(15a), target SPARCstation/Sun 4
Send bug reports and questions to cmucl-bugs@cs.cmu.edu.
* (proclaim '(optimize (speed 3)(safety 0)(space 0)(compilation-speed 0)))

EXTENSIONS::%UNDEFINED%
* (defun float-fun (x) (declare (single-float x)) x)

FLOAT-FUN
* (compile *)
Compiling FUNCTION LAMBDA: 

In: FUNCTION LAMBDA
  #'(LAMBDA (X) (DECLARE (SINGLE-FLOAT X)) (BLOCK FLOAT-FUN X))
Note: Doing MOVE-FROM-SINGLE (cost 13) from X to "<return value>".

Compiling Top-Level Form: 

Compilation unit finished.
  1 note


FLOAT-FUN
T
NIL
* (declaim (ftype (function (single-float) single-float) float-fun))

EXTENSIONS::%UNDEFINED%
* (defun test2 (x) (float-fun x))

TEST2
* (compile *)
Compiling FUNCTION LAMBDA: 

In: FUNCTION LAMBDA
  (FLOAT-FUN X)
Note: Doing MOVE-FROM-SINGLE (cost 13).

Compiling Top-Level Form: 

Compilation unit finished.
  1 note


TEST2
T
NIL
* (defun test3 (x cond) (if cond (float-fun x) 0.0))

TEST3
* (compile *)
Compiling FUNCTION LAMBDA: 

In: FUNCTION LAMBDA
  (FLOAT-FUN X)
Note: Doing MOVE-FROM-SINGLE (cost 13).

Compiling Top-Level Form: 

Compilation unit finished.
  1 note


TEST3
T
NIL
* (defun test4 (cond) (if cond 1.0 0.0))

TEST4
* (compile *)
Compiling FUNCTION LAMBDA: 

In: FUNCTION LAMBDA
  #'(LAMBDA (COND) (BLOCK TEST4 (IF COND 1.0 0.0)))
Note: Doing MOVE-FROM-SINGLE (cost 13) to "<return value>".

Compiling Top-Level Form: 

Compilation unit finished.
  1 note


TEST4
T
NIL
* (compile NIL #'(lambda (x) (float-fun x)))
Compiling FUNCTION LAMBDA: 

In: FUNCTION LAMBDA
  (FLOAT-FUN X)
Note: Doing MOVE-FROM-SINGLE (cost 13).

Compiling Top-Level Form: 

Compilation unit finished.
  1 note


#<Function "FUNCTION LAMBDA" {703FAB1}>
T
NIL

The only case that didn't have the problem on the Sparc (that I can remember)
was when there was only a single possible value, a constant float, to
be returned:

* (defun test5 (ignore-me) (declare (ignore ignore-me)) 0.0)

TEST5
* (compile *)
Compiling FUNCTION LAMBDA: 
Compiling Top-Level Form: 

TEST5
NIL
NIL

- Trent