1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

Tweak optimization order

* module/language/cps/optimize.scm (optimize-first-order-cps): Move up
  the simplify-primcalls pass, to allow DCE to take away unneeded
  constants.  An incremental step
This commit is contained in:
Andy Wingo 2017-11-01 21:26:11 +01:00
parent 1160690fde
commit e8b883035d

View file

@ -1,6 +1,6 @@
;;; Continuation-passing style (CPS) intermediate language (IL)
;; Copyright (C) 2013, 2014, 2015 Free Software Foundation, Inc.
;; Copyright (C) 2013, 2014, 2015, 2017 Free Software Foundation, Inc.
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -106,13 +106,13 @@
(define-optimizer optimize-first-order-cps
(specialize-numbers #:specialize-numbers? #t)
(hoist-loop-invariant-code #:licm? #t)
(specialize-primcalls #:specialize-primcalls? #t)
(eliminate-common-subexpressions #:cse? #t)
(eliminate-dead-code #:eliminate-dead-code? #t)
;; Running simplify here enables rotate-loops to do a better job.
(simplify #:simplify? #t)
(rotate-loops #:rotate-loops? #t)
(simplify #:simplify? #t)
(specialize-primcalls #:specialize-primcalls? #t))
(simplify #:simplify? #t))
(define (cps-default-optimization-options)
(list ;; #:split-rec? #t