polly and bolt fixes

This commit is contained in:
Alexander Frick 2024-11-26 21:54:52 -06:00
parent 50eecafc5b
commit 4897f662d8
9 changed files with 57 additions and 29 deletions

View file

@ -87,4 +87,4 @@ enable_rust = true
enable_all_rust_features = true
init_stack_vars_zero = true
chrome_pgo_phase = 2
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732295315-c40887b1918f8e01bfcd937f2f416b7fffac2252-74da9411216ab49f72b5ea57c6e907e5cf436f73.profdata"
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732380281-628a3b15abb0d91eb54d4f580a0201950ef6f42f-1d82f3f10d1e206a7d99e1b5122a997bec34666a.profdata"

View file

@ -266,6 +266,21 @@ config("no_unresolved_symbols") {
}
}
# Emit relocations for BOLT
config("emit-relocs") {
if (!using_sanitizer && use_bolt) {
if (is_win) {
ldflags = [
"-mllvm:--emit-relocs",
]
} else {
ldflags = [
"-Wl,--emit-relocs",
]
}
}
}
# compiler ---------------------------------------------------------------------
#
# Base compiler configuration.
@ -2629,11 +2644,11 @@ if (is_win) {
if (use_polly == true) {
common_optimize_on_ldflags += [
"-mllvm:-polly",
"-mllvm:-polly-detect-profitability-min-per-loop-insts=40",
"-mllvm:-polly-invariant-load-hoisting",
"-mllvm:-polly-run-dce",
"-mllvm:-polly-vectorizer=stripmine",
"-mllvm:-polly",
"-mllvm:-polly-detect-profitability-min-per-loop-insts=40",
#"-mllvm:-polly-invariant-load-hoisting",
"-mllvm:-polly-run-dce",
"-mllvm:-polly-vectorizer=stripmine",
]
}
@ -2772,11 +2787,11 @@ if (is_win) {
if (use_polly == true) {
common_optimize_on_ldflags += [
"-Wl,-mllvm,-polly",
"-Wl,-mllvm,-polly-detect-profitability-min-per-loop-insts=40",
"-Wl,-mllvm,-polly-invariant-load-hoisting",
"-Wl,-mllvm,-polly-run-dce",
"-Wl,-mllvm,-polly-vectorizer=stripmine",
"-Wl,-mllvm,-polly",
"-Wl,-mllvm,-polly-detect-profitability-min-per-loop-insts=40",
#"-Wl,-mllvm,-polly-invariant-load-hoisting",
"-Wl,-mllvm,-polly-run-dce",
"-Wl,-mllvm,-polly-vectorizer=stripmine",
]
}

View file

@ -87,4 +87,4 @@ enable_rust = true
enable_all_rust_features = true
init_stack_vars_zero = true
chrome_pgo_phase = 2
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732295315-c40887b1918f8e01bfcd937f2f416b7fffac2252-74da9411216ab49f72b5ea57c6e907e5cf436f73.profdata"
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732380281-628a3b15abb0d91eb54d4f580a0201950ef6f42f-1d82f3f10d1e206a7d99e1b5122a997bec34666a.profdata"

View file

@ -87,4 +87,4 @@ enable_rust = true
enable_all_rust_features = true
init_stack_vars_zero = true
chrome_pgo_phase = 2
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732295315-c40887b1918f8e01bfcd937f2f416b7fffac2252-74da9411216ab49f72b5ea57c6e907e5cf436f73.profdata"
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732380281-628a3b15abb0d91eb54d4f580a0201950ef6f42f-1d82f3f10d1e206a7d99e1b5122a997bec34666a.profdata"

View file

@ -87,4 +87,4 @@ enable_rust = true
enable_all_rust_features = true
init_stack_vars_zero = true
chrome_pgo_phase = 2
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732295315-c40887b1918f8e01bfcd937f2f416b7fffac2252-74da9411216ab49f72b5ea57c6e907e5cf436f73.profdata"
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732380281-628a3b15abb0d91eb54d4f580a0201950ef6f42f-1d82f3f10d1e206a7d99e1b5122a997bec34666a.profdata"

View file

@ -87,4 +87,4 @@ enable_rust = true
enable_all_rust_features = true
init_stack_vars_zero = true
chrome_pgo_phase = 2
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732295315-c40887b1918f8e01bfcd937f2f416b7fffac2252-74da9411216ab49f72b5ea57c6e907e5cf436f73.profdata"
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732380281-628a3b15abb0d91eb54d4f580a0201950ef6f42f-1d82f3f10d1e206a7d99e1b5122a997bec34666a.profdata"

View file

@ -87,4 +87,4 @@ enable_rust = true
enable_all_rust_features = true
init_stack_vars_zero = true
chrome_pgo_phase = 2
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732295315-c40887b1918f8e01bfcd937f2f416b7fffac2252-74da9411216ab49f72b5ea57c6e907e5cf436f73.profdata"
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6723-1732380281-628a3b15abb0d91eb54d4f580a0201950ef6f42f-1d82f3f10d1e206a7d99e1b5122a997bec34666a.profdata"

View file

@ -266,6 +266,21 @@ config("no_unresolved_symbols") {
}
}
# Emit relocations for BOLT
config("emit-relocs") {
if (!using_sanitizer && use_bolt) {
if (is_win) {
ldflags = [
"-mllvm:--emit-relocs",
]
} else {
ldflags = [
"-Wl,--emit-relocs",
]
}
}
}
# compiler ---------------------------------------------------------------------
#
# Base compiler configuration.
@ -2629,11 +2644,11 @@ if (is_win) {
if (use_polly == true) {
common_optimize_on_ldflags += [
"-mllvm:-polly",
"-mllvm:-polly-detect-profitability-min-per-loop-insts=40",
"-mllvm:-polly-invariant-load-hoisting",
"-mllvm:-polly-run-dce",
"-mllvm:-polly-vectorizer=stripmine",
"-mllvm:-polly",
"-mllvm:-polly-detect-profitability-min-per-loop-insts=40",
#"-mllvm:-polly-invariant-load-hoisting",
"-mllvm:-polly-run-dce",
"-mllvm:-polly-vectorizer=stripmine",
]
}
@ -2772,11 +2787,11 @@ if (is_win) {
if (use_polly == true) {
common_optimize_on_ldflags += [
"-Wl,-mllvm,-polly",
"-Wl,-mllvm,-polly-detect-profitability-min-per-loop-insts=40",
"-Wl,-mllvm,-polly-invariant-load-hoisting",
"-Wl,-mllvm,-polly-run-dce",
"-Wl,-mllvm,-polly-vectorizer=stripmine",
"-Wl,-mllvm,-polly",
"-Wl,-mllvm,-polly-detect-profitability-min-per-loop-insts=40",
#"-Wl,-mllvm,-polly-invariant-load-hoisting",
"-Wl,-mllvm,-polly-run-dce",
"-Wl,-mllvm,-polly-vectorizer=stripmine",
]
}

View file

@ -776,9 +776,7 @@ def main():
ldflags = []
targets = 'AArch64;ARM;LoongArch;Mips;PowerPC;RISCV;SystemZ;WebAssembly;X86'
projects = 'clang;lld;clang-tools-extra;polly'
if args.bolt:
projects += ';bolt'
projects = 'clang;lld;clang-tools-extra;polly;bolt'
pic_default = sys.platform == 'win32'
pic_mode = 'ON' if args.pic or pic_default else 'OFF'