;;; FIXME: Doesn't this belong somewhere else, like early-c.lisp?
(declaim (special *constants* *free-vars* *component-being-compiled*
- *code-vector* *next-location* *result-fixups*
*free-funs* *source-paths*
*continuation-number* *continuation-numbers*
*number-continuations* *tn-id* *tn-ids* *id-tns*
(defparameter *max-optimize-iterations* 3 ; ARB
#!+sb-doc
"The upper limit on the number of times that we will consecutively do IR1
- optimization that doesn't introduce any new code. A finite limit is
- necessary, since type inference may take arbitrarily long to converge.")
+optimization that doesn't introduce any new code. A finite limit is
+necessary, since type inference may take arbitrarily long to converge.")
(defevent ir1-optimize-until-done "IR1-OPTIMIZE-UNTIL-DONE called")
(defevent ir1-optimize-maxed-out "hit *MAX-OPTIMIZE-ITERATIONS* limit")
(return))
(incf loop-count)))
+ (when *check-consistency*
+ (do-blocks-backwards (block component)
+ (awhen (flush-dead-code block)
+ (let ((*compiler-error-context* it))
+ (compiler-warn "dead code detected at the end of ~S"
+ 'ir1-phases)))))
+
(ir1-finalize component)
(values))
(check-life-consistency component))
(maybe-mumble "pack ")
- (pack component)
+ (sb!regalloc:pack component)
(when *check-consistency*
(maybe-mumble "check-pack ")