rhill       14/06/01 23:00:46

  Modified:             ChangeLog toolchain.eclass
  Log:
  If we keep the flag list sorted by version there's no need for this function
  to be recursive. This shaves a couple seconds off the worst-case runtime.

Revision  Changes    Path
1.1280               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1280&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1280&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1279&r2=1.1280

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1279
retrieving revision 1.1280
diff -u -r1.1279 -r1.1280
--- ChangeLog   1 Jun 2014 22:07:59 -0000       1.1279
+++ ChangeLog   1 Jun 2014 23:00:45 -0000       1.1280
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1279 2014/06/01 
22:07:59 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1280 2014/06/01 
23:00:45 rhill Exp $
+
+  01 Jun 2014; Ryan Hill <rh...@gentoo.org> toolchain.eclass:
+  If we keep the flag list sorted by version there's no need for this function
+  to be recursive. This shaves a couple seconds off the worst-case runtime.
 
   01 Jun 2014; Michał Górny <mgo...@gentoo.org> git-r3.eclass,
   +tests/git-r3:subrepos.sh:



1.632                eclass/toolchain.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.632&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.632&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.631&r2=1.632

Index: toolchain.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
retrieving revision 1.631
retrieving revision 1.632
diff -u -r1.631 -r1.632
--- toolchain.eclass    1 Jun 2014 17:29:42 -0000       1.631
+++ toolchain.eclass    1 Jun 2014 23:00:45 -0000       1.632
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.631 2014/06/01 
17:29:42 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.632 2014/06/01 
23:00:45 rhill Exp $
 
 # Maintainer: Toolchain Ninjas <toolch...@gentoo.org>
 
@@ -1233,8 +1233,8 @@
        [[ ${mytune} == x86-64 ]] && filter-flags '-mtune=*'
        [[ ${bver} < 3.4 ]] && filter-flags '-mtune=*'
 
+       # "added" "arch" "replacement"
        local archlist=(
-               # "added" "arch" "replacement"
                4.9 bdver4 bdver3
                4.9 bonnell atom
                4.9 broadwell core-avx2
@@ -1271,10 +1271,10 @@
                3.4 pentium4m pentium4
        )
 
-       myarch=$(get-flag march)
-       mytune=$(get-flag mtune)
-
        for ((i = 0; i < ${#archlist[@]}; i += 3)) ; do
+               myarch=$(get-flag march)
+               mytune=$(get-flag mtune)
+
                ver=${archlist[i]}
                arch=${archlist[i + 1]}
                rep=${archlist[i + 2]}
@@ -1285,15 +1285,14 @@
                        einfo "Replacing ${myarch} (added in gcc ${ver}) with 
${rep}..."
                        [[ ${myarch} == ${arch} ]] && replace-cpu-flags 
${myarch} ${rep}
                        [[ ${mytune} == ${arch} ]] && replace-cpu-flags 
${mytune} ${rep}
-                       downgrade_arch_flags ${1:-${GCC_BRANCH_VER}}
-                       break
+                       continue
                else
                        break
                fi
        done
 
+       # we only check -mno* here since -m* get removed by strip-flags later on
        local isalist=(
-               # we only check -mno* here since -m* get removed by strip-flags 
later on
                4.9 -mno-sha
                4.9 -mno-avx512pf
                4.9 -mno-avx512f




Reply via email to