Polly args

This commit is contained in:
Alexander Frick 2023-03-09 00:57:55 -06:00
parent 44ad3ce211
commit 230ba31ba6
3 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,7 @@
/* Generated by ffconf */
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
#define AV_HAVE_BIGENDIAN 0
#define AV_HAVE_FAST_UNALIGNED 0
#endif
/* AVUTIL_AVCONFIG_H */

View file

@ -70,6 +70,9 @@ declare_args() {
# This is initialized below, after use_gold might have been overridden. # This is initialized below, after use_gold might have been overridden.
gold_path = "" gold_path = ""
# Whether to enable LLVM's Polly optimizations. See https://polly.llvm.org/
use_polly = false
# Enable fatal linker warnings. Building Chromium with certain versions # Enable fatal linker warnings. Building Chromium with certain versions
# of binutils can cause linker warning. # of binutils can cause linker warning.
fatal_linker_warnings = true fatal_linker_warnings = true
@ -2068,6 +2071,15 @@ if (is_win) {
"-mllvm:-enable-gvn-hoist", "-mllvm:-enable-gvn-hoist",
] ]
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-vectorizer=stripmine",
]
}
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
# misleading symbols in stack traces. # misleading symbols in stack traces.
if (!is_debug && !is_component_build) { if (!is_debug && !is_component_build) {
@ -2128,6 +2140,15 @@ if (is_win) {
"-Wl,-O3", "-Wl,-O3",
] ]
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-vectorizer=stripmine",
]
}
if (is_android) { if (is_android) {
# TODO(jdduke) Re-enable on mips after resolving linking # TODO(jdduke) Re-enable on mips after resolving linking
# issues with libc++ (crbug.com/456380). # issues with libc++ (crbug.com/456380).

View file

@ -0,0 +1,7 @@
/* Generated by ffconf */
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
#define AV_HAVE_BIGENDIAN 0
#define AV_HAVE_FAST_UNALIGNED 0
#endif
/* AVUTIL_AVCONFIG_H */