Skip to content

Commit

Permalink
more optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex313031 committed Mar 6, 2024
1 parent 9662dad commit c4cae17
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 4 deletions.
9 changes: 9 additions & 0 deletions mozconfigs/mozconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -63,6 +65,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down Expand Up @@ -92,6 +95,12 @@ ac_add_options MOZ_LTO=cross
export MOZ_PGO=1
ac_add_options MOZ_PGO=1

if test "$GEN_PGO"; then
ac_add_options --enable-profile-generate
elif test "$USE_PGO"; then
ac_add_options --enable-profile-use
fi

# Compiler, Linker, and Rust flags
export CFLAGS="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
export CPPFLAGS="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
Expand Down
3 changes: 3 additions & 0 deletions mozconfigs/mozconfig-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
ac_add_options --enable-optimize="-O3 -march=armv8-a+simd -mtune=cortex-a72"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -61,6 +63,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
3 changes: 3 additions & 0 deletions mozconfigs/mozconfig-avx2
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
ac_add_options --enable-wasm-avx
#ac_add_options --enable-avx2
ac_add_options --enable-optimize="-O3 -march=x86-64-v3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -64,6 +66,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
1 change: 1 addition & 0 deletions mozconfigs/mozconfig-debug
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
2 changes: 2 additions & 0 deletions mozconfigs/mozconfig-macos-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ac_add_options --enable-optimize="-O3 -march=armv8.3-a+simd"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -58,6 +59,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
2 changes: 2 additions & 0 deletions mozconfigs/mozconfig-macos-arm64-cross
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ac_add_options --enable-optimize="-O3 -march=armv8.3-a+simd"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -60,6 +61,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
2 changes: 2 additions & 0 deletions mozconfigs/mozconfig-macos-x64
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ac_add_options --enable-optimize="-O3 -march=x86-64-v3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -60,6 +61,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
2 changes: 2 additions & 0 deletions mozconfigs/mozconfig-macos-x64-cross
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ac_add_options --enable-optimize="-O3 -march=x86-64-v3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -62,6 +63,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
3 changes: 3 additions & 0 deletions mozconfigs/mozconfig-sse3
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
#ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-O3 -msse3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -63,6 +65,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
3 changes: 3 additions & 0 deletions mozconfigs/mozconfig-sse4
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
#ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-O3 -msse3 -mssse3 -msse4.1"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -63,6 +65,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
5 changes: 4 additions & 1 deletion mozconfigs/mozconfig-win
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-O2 -O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes -Xclang -O3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -67,6 +69,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Installer
export WIN32_REDIST_DIR="/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/14.38.33130/x64/Microsoft.VC143.CRT"
Expand Down Expand Up @@ -104,6 +107,6 @@ export CFLAGS="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes /clang:-O3 /arch
export CPPFLAGS="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes /clang:-O3 /arch:AVX"
export CXXFLAGS="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes /clang:-O3 /arch:AVX"
export LDFLAGS="-Wl,-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
#export MOZ_LTO_LDFLAGS="-mllvm:-polly"
POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
export RUSTFLAGS="-C target-feature=+avx"
export VERBOSE=1
5 changes: 4 additions & 1 deletion mozconfigs/mozconfig-win-avx2
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-O2 -O3 -march=x86-64-v3 -Xclang -O3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -67,6 +69,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Installer
export WIN32_REDIST_DIR="/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/14.38.33130/x64/Microsoft.VC143.CRT"
Expand Down Expand Up @@ -104,6 +107,6 @@ export CFLAGS="-O3 -march=x86-64-v3 /clang:-O3 /clang:-ffp-contract=fast /arch:A
export CPPFLAGS="-O3 -march=x86-64-v3 /clang:-O3 /clang:-ffp-contract=fast /arch:AVX2"
export CXXFLAGS="-O3 -march=x86-64-v3 /clang:-O3 /clang:-ffp-contract=fast /arch:AVX2"
export LDFLAGS="-Wl,-O3 -march=x86-64-v3"
#export MOZ_LTO_LDFLAGS="-mllvm:-polly"
POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
export RUSTFLAGS="-C target-feature=+avx2"
export VERBOSE=1
2 changes: 2 additions & 0 deletions mozconfigs/mozconfig-win-avx2-cross
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ ac_add_options --enable-optimize="/O2 /clang:-O3 -march=x86-64-v3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -74,6 +75,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
2 changes: 2 additions & 0 deletions mozconfigs/mozconfig-win-cross
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ ac_add_options --enable-optimize="-mavx -maes /O2 /clang:-O3 /arch:AVX"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -74,6 +75,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Branding
ac_add_options --with-app-name=mercury
Expand Down
1 change: 1 addition & 0 deletions mozconfigs/mozconfig-win-debug
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Installer
export WIN32_REDIST_DIR="/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/14.38.33130/x64/Microsoft.VC143.CRT"
Expand Down
5 changes: 4 additions & 1 deletion mozconfigs/mozconfig-win-sse3
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
#ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-O2 -O3 -msse3 -Xclang -O3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -67,6 +69,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Installer
export WIN32_REDIST_DIR="/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/14.38.33130/x64/Microsoft.VC143.CRT"
Expand Down Expand Up @@ -104,6 +107,6 @@ export CFLAGS="-O3 -msse3 /clang:-O3"
export CPPFLAGS="-O3 -msse3 /clang:-O3"
export CXXFLAGS="-O3 -msse3 /clang:-O3"
export LDFLAGS="-Wl,-O3 -msse3"
#export MOZ_LTO_LDFLAGS="-mllvm:-polly"
POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
export RUSTFLAGS="-C target-feature=+sse3"
export VERBOSE=1
5 changes: 4 additions & 1 deletion mozconfigs/mozconfig-win-sse4
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
#ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-O2 -O3 -msse3 -mssse3 -msse4.1 -Xclang -O3"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
Expand Down Expand Up @@ -67,6 +69,7 @@ MOZ_REQUIRE_SIGNING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=

# Installer
export WIN32_REDIST_DIR="/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/14.38.33130/x64/Microsoft.VC143.CRT"
Expand Down Expand Up @@ -104,6 +107,6 @@ export CFLAGS="-O3 -msse3 -mssse3 -msse4.1 /clang:-O3"
export CPPFLAGS="-O3 -msse3 -mssse3 -msse4.1 /clang:-O3"
export CXXFLAGS="-O3 -msse3 -mssse3 -msse4.1 /clang:-O3"
export LDFLAGS="-Wl,-O3 -msse3 -mssse3 -msse4.1"
#export MOZ_LTO_LDFLAGS="-mllvm:-polly"
POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
export RUSTFLAGS="-C target-feature=+sse4.1"
export VERBOSE=1

0 comments on commit c4cae17

Please sign in to comment.