From: Tito L. <tit...@gm...> - 2013-05-25 08:28:54
|
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). ; ; note: unable to ; Convert ASH of word to %ASH/RIGHT ; due to type uncertainty: ; The second argument is a (UNSIGNED-BYTE 4), not a (INTEGER * 0). ; ; compilation unit finished ; printed 2 notes (disassemble #'channel) ; disassembly for CHANNEL ; Size: 17 bytes ; 03F65542: 48D1F9 SAR RCX, 1 ; no-arg-parsing entry point ; 45: BA02000000 MOV EDX, 2 ; 4A: 48D3E2 SHL RDX, CL ; 4D: 488BE5 MOV RSP, RBP ; 50: F8 CLC ; 51: 5D POP RBP ; 52: C3 RET Tito Latini |
From: Jingyi H. <hou...@gm...> - 2013-05-26 01:38:32
|
Unable to reproduce this note under `i386 GNU/Linux 3.2.0-23-generic-pae‘, so I'm guessing this is a x86_64-specific problem? On Sat, May 25, 2013 at 4:28 PM, Tito Latini <tit...@gm...> 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). > ; > ; note: unable to > ; Convert ASH of word to %ASH/RIGHT > ; due to type uncertainty: > ; The second argument is a (UNSIGNED-BYTE 4), not a (INTEGER * 0). > ; > ; compilation unit finished > ; printed 2 notes > > (disassemble #'channel) > ; disassembly for CHANNEL > ; Size: 17 bytes > ; 03F65542: 48D1F9 SAR RCX, 1 ; > no-arg-parsing entry point > ; 45: BA02000000 MOV EDX, 2 > ; 4A: 48D3E2 SHL RDX, CL > ; 4D: 488BE5 MOV RSP, RBP > ; 50: F8 CLC > ; 51: 5D POP RBP > ; 52: C3 RET > > Tito Latini > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > Sbcl-devel mailing list > Sbc...@li... > https://lists.sourceforge.net/lists/listinfo/sbcl-devel > -- Cheers, Jingyi Hou |
From: Tito L. <tit...@gm...> - 2013-05-26 09:14:32
|
sorry, it appears only with COMPILE-FILE on x86 and x86-64 On Sun, May 26, 2013 at 09:38:24AM +0800, Jingyi Hou wrote: > Unable to reproduce this note under `i386 GNU/Linux 3.2.0-23-generic-pae?, > so I'm guessing this is a x86_64-specific problem? |
From: Paul K. <pv...@pv...> - 2013-05-27 23:38:39
|
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 freeze. Paul Khuong |
From: Tito L. <tit...@gm...> - 2013-05-28 13:26:01
|
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 > freeze. > > 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. Tito Latini |