Microoptimisation for block headers on x86-64
authorPaul Khuong <pvk@pvk.ca>
Thu, 23 Jun 2011 15:05:54 +0000 (11:05 -0400)
committerPaul Khuong <pvk@pvk.ca>
Thu, 23 Jun 2011 15:05:54 +0000 (11:05 -0400)
 Only emit a jmp over the header if a predecessor falls through to
 the current block, and it there is a trampoline.  Otherwise, it's
 not worth the cost of a branch to skip a few NOPs.

src/compiler/x86-64/call.lisp

index b19771d..4071fb7 100644 (file)
 ;;; calls. Emit a header for local calls to pop the return address
 ;;; in the right place.
 (defun emit-block-header (start-label trampoline-label fall-thru-p alignp)
-  (when (and fall-thru-p (or trampoline-label alignp))
+  (when (and fall-thru-p trampoline-label)
     (inst jmp start-label))
   (when alignp
     (emit-alignment n-lowtag-bits #x90))