aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-09-06 21:28:16 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-09-06 21:28:16 -0400
commit695de5d1eda6382b20fadb0a2b2d286b57a6a61c (patch)
tree8ee1db1a36f5497b3428d015f291c96ef4289acd /src
parent784b1ba1a2b9306697544bedb2ef9425185dd206 (diff)
downloadpostgresql-695de5d1eda6382b20fadb0a2b2d286b57a6a61c.tar.gz
postgresql-695de5d1eda6382b20fadb0a2b2d286b57a6a61c.zip
Split Makefile symbol CFLAGS_VECTOR into two symbols.
Replace CFLAGS_VECTOR with CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE, allowing us to distinguish whether we want to apply -funroll-loops, -ftree-vectorize, or both to a particular source file. Up to now the only consumer of the symbol has been checksum.c which wants both, so that there was no need to distinguish; but that's about to change. Amit Khandekar, reviewed and edited a little by me Discussion: https://postgr.es/m/CAJ3gD9evtA_vBo+WMYMyT-u=keHX7-r8p2w7OSRfXf42LTwCZQ@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in3
-rw-r--r--src/backend/storage/page/Makefile4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 9a6265b3a0b..7ca1e9aac59 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -259,7 +259,8 @@ SUN_STUDIO_CC = @SUN_STUDIO_CC@
CXX = @CXX@
CFLAGS = @CFLAGS@
CFLAGS_SL = @CFLAGS_SL@
-CFLAGS_VECTOR = @CFLAGS_VECTOR@
+CFLAGS_UNROLL_LOOPS = @CFLAGS_UNROLL_LOOPS@
+CFLAGS_VECTORIZE = @CFLAGS_VECTORIZE@
CFLAGS_SSE42 = @CFLAGS_SSE42@
CFLAGS_ARMV8_CRC32C = @CFLAGS_ARMV8_CRC32C@
PERMIT_DECLARATION_AFTER_STATEMENT = @PERMIT_DECLARATION_AFTER_STATEMENT@
diff --git a/src/backend/storage/page/Makefile b/src/backend/storage/page/Makefile
index 10021e2bb31..da539b113a6 100644
--- a/src/backend/storage/page/Makefile
+++ b/src/backend/storage/page/Makefile
@@ -19,5 +19,5 @@ OBJS = \
include $(top_srcdir)/src/backend/common.mk
-# important optimizations flags for checksum.c
-checksum.o: CFLAGS += ${CFLAGS_VECTOR}
+# Provide special optimization flags for checksum.c
+checksum.o: CFLAGS += ${CFLAGS_UNROLL_LOOPS} ${CFLAGS_VECTORIZE}