summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQue Quotion2019-09-26 09:38:40 +0900
committerQue Quotion2019-09-26 09:38:40 +0900
commit7b140304d73b84e71e3cd28250f985bb35ca5685 (patch)
tree1bca0d5923e41a4dcdc50fb0dc38dcab64c4b480
parent07e32248a7aa0fdfb7b35f4cd9d7315c34e3687a (diff)
downloadaur-7b140304d73b84e71e3cd28250f985bb35ca5685.tar.gz
Separate options for clang; reduce overlap in graphite and rice; intensify graphite flags; output status messages from pgo
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD18
-rw-r--r--ZZ-lto.sh.in21
-rw-r--r--buildenv_ext.conf10
-rw-r--r--cflags.conf2
-rw-r--r--graphite.sh.in11
-rw-r--r--ldflags.conf2
-rw-r--r--pgo.sh.in2
-rw-r--r--rice.sh.in9
9 files changed, 49 insertions, 43 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ddcd2b7d59a2..f9dc3936bbe8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = makepkg-optimize
pkgdesc = Supplemental build and packaging optimizations for makepkg
- pkgver = 12
+ pkgver = 13
pkgrel = 1
url = https://wiki.archlinux.org/index.php/Makepkg-optimize
arch = any
@@ -9,6 +9,7 @@ pkgbase = makepkg-optimize
optdepends = upx
optdepends = optipng
optdepends = nodejs-svgo
+ optdepends = openmp
conflicts = makepkg-optimize
conflicts = makepkg-optimize2
conflicts = pacman-buildenv_ext-git
@@ -36,23 +37,23 @@ pkgbase = makepkg-optimize
source = pkgopts_ext.conf
source = pkgopts-param_ext.conf
source = compress-param_max.conf
- sha1sums = dae91a563dd767f3e3059240009b40106aadbc35
- sha1sums = 7a0118bc4fef1e136211a8b28af731344df30f67
- sha1sums = 17b601c832b4af263d6ebdc894ee3ef59f9ee8b4
- sha1sums = 891c616c4f2414c503ea88ed60242e67677d88da
+ sha1sums = a9af81c30f57b7db6a9a52796d79399a4e754791
+ sha1sums = 3e512ce1dfacc1163ca1ebec3d6821b499498174
+ sha1sums = d7a3801037333c582dba976db27cf8896bc1b401
+ sha1sums = c99d9cb49dd31924a1cb298bcfe142cef31a9fd3
sha1sums = a893c32f2a3fff8b279025ec60f0c3d88143dc1e
sha1sums = 9270b5e33d4508a959688a10c20dec3732763937
sha1sums = 34a33b47a8b667f9dc810737c0f598660b962d4c
sha1sums = 68292bac87e22885069330dbdc198e13be88ab95
sha1sums = 5801de7cd6e2bd462b7e051aa3aa818a30dc7af5
sha1sums = 368342c7891345bdbcc4c21e79aa4840ab5b76b9
- sha1sums = f7da4e29ea24c85870ff0e55864f7bafbce7ad8f
+ sha1sums = 4d11331aeff1c1ec3de3759710acc060769ef274
sha1sums = 83a6d62b19184cac1de02c957cd4ea7bbdac9ddb
sha1sums = dea4d727d81ac040846555e59ac7c34eb0978233
- sha1sums = 202d11e49a611bb400029512cf159a0f8645a6db
+ sha1sums = eef21d80145bf64133206beba26fd7fab5a8f5bc
sha1sums = 2e2cd8c680a86518652543fda9092bf2ab594660
sha1sums = 981eab856abb43c5e093620cdf4d8bfa2d690805
- sha1sums = 8775a34738b8c19238bcedd41180bf113049ed41
+ sha1sums = 540ce964ef6f3bdda1d7b7fd6297866b1ee895b1
sha1sums = efb3ed7d7d5516259709149d7bcd6ec208c07593
sha1sums = 1fc8035e64b739e20c70fbb4eaa5cb7aa1c63c90
sha1sums = 5d0cde13b50641371e4ec4d813d6b2dfae493889
diff --git a/PKGBUILD b/PKGBUILD
index c1705f3a1fcd..91a90dac4960 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: bartus ( aur\at\bartus.33mail.com )
pkgname=makepkg-optimize
-pkgver=12
+pkgver=13
pkgrel=1
pkgdesc='Supplemental build and packaging optimizations for makepkg'
arch=('any')
@@ -11,7 +11,7 @@ url='https://wiki.archlinux.org/index.php/Makepkg-optimize'
conflicts=(makepkg-optimize{,2} pacman-buildenv_ext-git)
replaces=('makepkg-optimize2' pacman-buildenv_ext-git)
depends=('pacman-git')
-optdepends=('upx' 'optipng' 'nodejs-svgo')
+optdepends=('upx' 'optipng' 'nodejs-svgo' 'openmp')
backup=(etc/makepkg-optimize.conf)
_buildenv=({pgo,ZZ-lto,graphite,rice}.sh.in)
_executable=({upx,optipng,svgo}-exec.sh.in)
@@ -21,23 +21,23 @@ source=(${_buildenv[@]}
${_executable[@]}
${_tidy[@]}
${_conf[@]})
-sha1sums=('dae91a563dd767f3e3059240009b40106aadbc35'
- '7a0118bc4fef1e136211a8b28af731344df30f67'
- '17b601c832b4af263d6ebdc894ee3ef59f9ee8b4'
- '891c616c4f2414c503ea88ed60242e67677d88da'
+sha1sums=('a9af81c30f57b7db6a9a52796d79399a4e754791'
+ '3e512ce1dfacc1163ca1ebec3d6821b499498174'
+ 'd7a3801037333c582dba976db27cf8896bc1b401'
+ 'c99d9cb49dd31924a1cb298bcfe142cef31a9fd3'
'a893c32f2a3fff8b279025ec60f0c3d88143dc1e'
'9270b5e33d4508a959688a10c20dec3732763937'
'34a33b47a8b667f9dc810737c0f598660b962d4c'
'68292bac87e22885069330dbdc198e13be88ab95'
'5801de7cd6e2bd462b7e051aa3aa818a30dc7af5'
'368342c7891345bdbcc4c21e79aa4840ab5b76b9'
- 'f7da4e29ea24c85870ff0e55864f7bafbce7ad8f'
+ '4d11331aeff1c1ec3de3759710acc060769ef274'
'83a6d62b19184cac1de02c957cd4ea7bbdac9ddb'
'dea4d727d81ac040846555e59ac7c34eb0978233'
- '202d11e49a611bb400029512cf159a0f8645a6db'
+ 'eef21d80145bf64133206beba26fd7fab5a8f5bc'
'2e2cd8c680a86518652543fda9092bf2ab594660'
'981eab856abb43c5e093620cdf4d8bfa2d690805'
- '8775a34738b8c19238bcedd41180bf113049ed41'
+ '540ce964ef6f3bdda1d7b7fd6297866b1ee895b1'
'efb3ed7d7d5516259709149d7bcd6ec208c07593'
'1fc8035e64b739e20c70fbb4eaa5cb7aa1c63c90'
'5d0cde13b50641371e4ec4d813d6b2dfae493889'
diff --git a/ZZ-lto.sh.in b/ZZ-lto.sh.in
index 01cc1d0d8cbf..c0950e23849a 100644
--- a/ZZ-lto.sh.in
+++ b/ZZ-lto.sh.in
@@ -10,21 +10,18 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/option.sh"
-build_options+=('lto' 'lto-thin')
+build_options+=('lto' 'lto-thin' 'lto-clang' 'lto-thin-clang')
buildenv_functions+=('buildenv_lto')
buildenv_lto() {
- if check_buildoption "lto" "y" || check_buildoption "lto-thin" "y" && \
- [[ -f "$(gcc -print-search-dirs | grep install | awk '{print $2 "liblto_plugin.so"}')" ]]; then
- [[ "$CC" == "clang" || "$CXX" == "clang++" ]] && \
- ltoflags=" -flto" || \
- ltoflags=" -flto=$(getconf _NPROCESSORS_ONLN) -flto-partition=none -fno-fat-lto-objects"
-
- if check_buildoption "lto-thin" "y"; then
- [[ "$CC" == "clang" || "$CXX" == "clang++" ]] && \
- ltoflags="${ltoflags// -flto/ -flto=thin}" || \
- ltoflags="${ltoflags// -flto-partition=none / }"
- fi
+ if check_buildoption "lto" "y" || check_buildoption "lto-thin" "y" || \
+ check_buildoption "lto-clang" "y" || check_buildoption "lto-thin-clang" "y"; then
+ ltoflags=" -flto"
+ check_buildoption "lto-thin-clang" "y" && ltoflags+="=thin"
+ check_buildoption "lto-thin" "y" || check_buildoption "lto" "y" && \
+ [[ -f "$(gcc -print-search-dirs | grep install | awk '{print $2 "liblto_plugin.so"}')" ]] && \
+ ltoflags+="=$(getconf _NPROCESSORS_ONLN) -fno-fat-lto-objects"
+ check_buildoption "lto" "y" && ltoflags+=" -flto-partition=none"
CFLAGS+="$ltoflags"
CXXFLAGS+="$ltoflags"
diff --git a/buildenv_ext.conf b/buildenv_ext.conf
index cb3fb3dcfe22..caa8c939e2cb 100644
--- a/buildenv_ext.conf
+++ b/buildenv_ext.conf
@@ -1,5 +1,5 @@
-#-- lto: Use link-time optimization (monolithic algorithm)
-#-- lto-thin: Use link-time optimization (partitioned algorithm)
-#-- pgo: Generate or utilize profile guided optimization
-#-- graphite: Use graphite loop optimization
-#-- rice: Use extreme and unsafe optimization
+#-- lto{,-clang}: Use monolithic link-time optimization (use "lto-clang" for clang/llvm)
+#-- lto-thin{,-clang}: Use partitioned link-time optimization (use "lto-thin-clang" for clang/llvm)
+#-- pgo: Generate or utilize profile guided optimization (requires two build and install cycles)
+#-- {graphite,polly}: Use polyhedral model optimization (use "polly" for clang/llvm)
+#-- rice{,-clang}: Use extreme and unsafe optimization (use "rice-clang" for clang/llvm)
diff --git a/cflags.conf b/cflags.conf
index e6737b36d89c..3ff5541ba90b 100644
--- a/cflags.conf
+++ b/cflags.conf
@@ -1,2 +1,2 @@
-#CFLAGS="-march=native -Ofast -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt -fopenmp -Wno-error -w" #
+#CFLAGS="-march=native -Ofast -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt -fopenmp -pthread -Wno-error -w" #
#CFLAGS="-march=native -Og -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt" #
diff --git a/graphite.sh.in b/graphite.sh.in
index ba0d6bdc0968..37b729f625df 100644
--- a/graphite.sh.in
+++ b/graphite.sh.in
@@ -1,6 +1,6 @@
#!/usr/bin/bash
#
-# graphite.sh - Compile with Graphite polyhedral modeling optimization
+# graphite.sh - Compile with polyhedral model optimization
#
[[ -n "$LIBMAKEPKG_BUILDENV_GRAPHITE_SH" ]] && return
@@ -10,12 +10,15 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/option.sh"
-build_options+=('graphite')
+build_options+=('graphite' 'polly')
buildenv_functions+=('buildenv_graphite')
buildenv_graphite() {
- if check_buildoption "graphite" "y"; then
- graphiteflags=" -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -ftree-vectorize"
+ if check_buildoption "graphite" "y" || check_buildoption "polly" "y"; then
+ graphiteflags=" -lgomp -mllvm -polly -mllvm -polly-num-threads=$(getconf _NPROCESSORS_ONLN) -mllvm -polly-parallel"
+ check_buildoption "graphite" "y" && \
+ graphiteflags=" -fgraphite-identity -floop-interchange -floop-nest-optimize -floop-parallelize-all -ftree-loop-distribution -ftree-parallelize-loops=$(getconf _NPROCESSORS_ONLN) -ftree-vectorize"
+
CFLAGS+="$graphiteflags"
CXXFLAGS+="$graphiteflags"
fi
diff --git a/ldflags.conf b/ldflags.conf
index 056abbc8227f..8f8b5acd1024 100644
--- a/ldflags.conf
+++ b/ldflags.conf
@@ -1 +1 @@
-#LDFLAGS="-Wl,-O4,--sort-common,--as-needed,-z,relro,-z,now,-lgomp" #
+#LDFLAGS="-Wl,-O4,--sort-common,--as-needed,-z,relro,-z,now,-lgomp,-lpthread" #
diff --git a/pgo.sh.in b/pgo.sh.in
index 5cb9c5101247..31f86121fd66 100644
--- a/pgo.sh.in
+++ b/pgo.sh.in
@@ -31,9 +31,11 @@ buildenv_pgo() {
if [ ! -d "$PROFDEST/$pkgbase.gen" ]; then
pgoflags=" -fprofile-generate -fprofile-dir=$PROFDEST/$pkgbase.gen"
pgoldflags=" -lgcov --coverage"
+ msg2 "Profile data will be generated."
else
[[ ! -d "$PROFDEST/$pkgbase.used" ]] && mv "$PROFDEST/$pkgbase.gen" "$PROFDEST/$pkgbase.used"
pgoflags=" -fprofile-correction -fprofile-use -fprofile-dir=$PROFDEST/$pkgbase.used"
+ msg2 "Profile data will be applied."
fi
CFLAGS+="$pgoflags"
diff --git a/rice.sh.in b/rice.sh.in
index ebe800c6bd09..9f253488786e 100644
--- a/rice.sh.in
+++ b/rice.sh.in
@@ -10,12 +10,15 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/option.sh"
-build_options+=('rice')
+build_options+=('rice' 'rice-clang')
buildenv_functions+=('buildenv_rice')
buildenv_rice() {
- if check_buildoption "rice" "y"; then
- riceflags=" -Ofast -fbranch-target-load-optimize2 -fcx-fortran-rules -fdata-sections -ffloat-store -fgcse-las -fgcse-sm -fipa-pta -floop-nest-optimize -fmodulo-sched -fmodulo-sched-allow-regmoves -fno-enforce-eh-specs -funsafe-math-optimizations -fno-threadsafe-statics -fnothrow-opt -fno-var-tracking-assignments -fomit-frame-pointer -fopenmp -fPIC -freg-struct-return -freschedule-modulo-scheduled-loops -fsched-pressure -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns=0 -fsched2-use-superblocks -fselective-scheduling -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fshort-wchar -ftree-parallelize-loops=$(getconf _NPROCESSORS_ONLN) -ftree-lrs -ftree-vectorize -fvariable-expansion-in-unroller -maccumulate-outgoing-args -Wno-sizeof-pointer-memaccess" # -fmerge-all-constants
+ if check_buildoption "rice" "y" || check_buildoption "rice-clang" "y"; then
+ riceflags=" -Ofast -fdata-sections -ffloat-store -fgcse-las -fgcse-sm -fmodulo-sched -fmodulo-sched-allow-regmoves -funsafe-math-optimizations -fno-threadsafe-statics -fomit-frame-pointer -fopenmp -fPIC -freg-struct-return -fshort-wchar -fvariable-expansion-in-unroller -Wno-sizeof-pointer-memaccess -pthread" #
+ check_buildoption "rice" "y" && \
+ riceflags+=" -fbranch-target-load-optimize2 -fcx-fortran-rules -fipa-pta -fno-enforce-eh-specs -fnothrow-opt -fno-var-tracking-assignments -freschedule-modulo-scheduled-loops -fsched-pressure -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns=0 -fsched2-use-superblocks -fselective-scheduling -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -ftree-lrs -maccumulate-outgoing-args" # -fmerge-all-constants
+
riceldflags=" -lpthread -lgomp" # -shared
CFLAGS+="$riceflags"
CXXFLAGS+="$riceflags"