On Mon, May 27, 2013 at 07:38:27PM -0400, Paul Khuong wrote:
> Tito Latini wrote:
> >hi, after a recent git-pull I get a strange note during the
> >compilation of the follow function:
> >;;;; Linux 3.4.15-rt25 x86_64 AMD Phenom(tm) II X6 1090T
> >(defun channel (chan)
> > (declare (optimize speed (safety 0))
> > (type (unsigned-byte 4) chan))
> > (ash 1 chan))
> >; file: /dev/shm/filetSMcYk
> >; in: DEFUN CHANNEL
> >; (ASH 1 CHAN)
> >; note: unable to
> >; Convert ASH of signed word to %ASH/RIGHT
> >; due to type uncertainty:
> >; The second argument is a (UNSIGNED-BYTE 4), not a (INTEGER * 0).
> Like other optimisation notes, these are diagnostic messages from the
> compiler, to inform you of potential rewrites (simplifications) that
> could not be applied because the preconditions are not satisfied.
> Sometimes you want the rewrite to fire, and sometimes you can even do
> something about the precondition; in that case, the notes are helpful.
> Otherwise, there's little you can do with the information; this is the
> case here. I'll see about making that transform less chatty after the
> Paul Khuong
The notes and the warnings of the compiler have taught me to write
faster code. I always remove them, following their suggestions or
using SB-EXT:MUFFLE-CONDITIONS when I know what I do. In the first
case I get faster code; in the second there are no distractions during
the next compilation and I can focus on the new possible suggestions.
I have signalled the note because I think there is a "qui pro quo"
in this case; if I want a left shift (the second argument of ASH is
declared non-negative), it is deceptive to receive a note about a
right shift. The compiler doesn't probably know the difference between
ASH/RIGHT and ASH/LEFT and perhaps a dummy %ASH/LEFT can help.
If it is not a problem for the other lispers, I'll simply adapt my code.