mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
llvm 18: general unix and darwin specifics
This commit is contained in:
+8
-7
@@ -25,12 +25,14 @@ error() {
|
|||||||
|
|
||||||
if [ -z "$LLVM_CONFIG" ]; then
|
if [ -z "$LLVM_CONFIG" ]; then
|
||||||
# darwin, linux, openbsd
|
# darwin, linux, openbsd
|
||||||
if [ -n "$(command -v llvm-config-17)" ]; then LLVM_CONFIG="llvm-config-17"
|
if [ -n "$(command -v llvm-config-18)" ]; then LLVM_CONFIG="llvm-config-18"
|
||||||
|
elif [ -n "$(command -v llvm-config-17)" ]; then LLVM_CONFIG="llvm-config-17"
|
||||||
elif [ -n "$(command -v llvm-config-14)" ]; then LLVM_CONFIG="llvm-config-14"
|
elif [ -n "$(command -v llvm-config-14)" ]; then LLVM_CONFIG="llvm-config-14"
|
||||||
elif [ -n "$(command -v llvm-config-13)" ]; then LLVM_CONFIG="llvm-config-13"
|
elif [ -n "$(command -v llvm-config-13)" ]; then LLVM_CONFIG="llvm-config-13"
|
||||||
elif [ -n "$(command -v llvm-config-12)" ]; then LLVM_CONFIG="llvm-config-12"
|
elif [ -n "$(command -v llvm-config-12)" ]; then LLVM_CONFIG="llvm-config-12"
|
||||||
elif [ -n "$(command -v llvm-config-11)" ]; then LLVM_CONFIG="llvm-config-11"
|
elif [ -n "$(command -v llvm-config-11)" ]; then LLVM_CONFIG="llvm-config-11"
|
||||||
# freebsd
|
# freebsd
|
||||||
|
elif [ -n "$(command -v llvm-config18)" ]; then LLVM_CONFIG="llvm-config18"
|
||||||
elif [ -n "$(command -v llvm-config17)" ]; then LLVM_CONFIG="llvm-config17"
|
elif [ -n "$(command -v llvm-config17)" ]; then LLVM_CONFIG="llvm-config17"
|
||||||
elif [ -n "$(command -v llvm-config14)" ]; then LLVM_CONFIG="llvm-config14"
|
elif [ -n "$(command -v llvm-config14)" ]; then LLVM_CONFIG="llvm-config14"
|
||||||
elif [ -n "$(command -v llvm-config13)" ]; then LLVM_CONFIG="llvm-config13"
|
elif [ -n "$(command -v llvm-config13)" ]; then LLVM_CONFIG="llvm-config13"
|
||||||
@@ -50,21 +52,20 @@ LLVM_VERSION_MAJOR="$(echo $LLVM_VERSION | awk -F. '{print $1}')"
|
|||||||
LLVM_VERSION_MINOR="$(echo $LLVM_VERSION | awk -F. '{print $2}')"
|
LLVM_VERSION_MINOR="$(echo $LLVM_VERSION | awk -F. '{print $2}')"
|
||||||
LLVM_VERSION_PATCH="$(echo $LLVM_VERSION | awk -F. '{print $3}')"
|
LLVM_VERSION_PATCH="$(echo $LLVM_VERSION | awk -F. '{print $3}')"
|
||||||
|
|
||||||
if [ $LLVM_VERSION_MAJOR -lt 11 ] ||
|
if [ $LLVM_VERSION_MAJOR -lt 11 ] || ([ $LLVM_VERSION_MAJOR -gt 14 ] && [ $LLVM_VERSION_MAJOR -lt 17 ]) || [ $LLVM_VERSION_MAJOR -gt 18 ]; then
|
||||||
([ $LLVM_VERSION_MAJOR -gt 14 ] && [ $LLVM_VERSION_MAJOR -lt 17 ]); then
|
error "Invalid LLVM version $LLVM_VERSION: must be 11, 12, 13, 14, 17 or 18"
|
||||||
error "Invalid LLVM version $LLVM_VERSION: must be 11, 12, 13, 14 or 17"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$OS_NAME" in
|
case "$OS_NAME" in
|
||||||
Darwin)
|
Darwin)
|
||||||
if [ "$OS_ARCH" = "arm64" ]; then
|
if [ "$OS_ARCH" = "arm64" ]; then
|
||||||
if [ $LLVM_VERSION_MAJOR -lt 13 ] || [ $LLVM_VERSION_MAJOR -gt 17 ]; then
|
if [ $LLVM_VERSION_MAJOR -lt 13 ]; then
|
||||||
error "Darwin Arm64 requires LLVM 13, 14 or 17"
|
error "Invalid LLVM version $LLVM_VERSION: Darwin Arm64 requires LLVM 13, 14, 17 or 18"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
|
CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
|
||||||
LDFLAGS="$LDFLAGS -liconv -ldl -framework System -lLLVM"
|
LDFLAGS="$LDFLAGS -liconv -ldl -framework System -lLLVM -Wl,-rpath $($LLVM_CONFIG --libdir)"
|
||||||
;;
|
;;
|
||||||
FreeBSD)
|
FreeBSD)
|
||||||
CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
|
CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
|
||||||
|
|||||||
+390
-6
@@ -1508,6 +1508,7 @@ gb_internal WORKER_TASK_PROC(lb_llvm_module_pass_worker_proc) {
|
|||||||
case 1:
|
case 1:
|
||||||
// default<Os>
|
// default<Os>
|
||||||
// Passes removed: coro, openmp, sroa
|
// Passes removed: coro, openmp, sroa
|
||||||
|
#if LLVM_VERSION_MAJOR == 17
|
||||||
array_add(&passes, u8R"(
|
array_add(&passes, u8R"(
|
||||||
annotation2metadata,
|
annotation2metadata,
|
||||||
forceattrs,
|
forceattrs,
|
||||||
@@ -1523,13 +1524,14 @@ globalopt,
|
|||||||
function<eager-inv>(
|
function<eager-inv>(
|
||||||
mem2reg,
|
mem2reg,
|
||||||
instcombine<max-iterations=1000;no-use-loop-info>,
|
instcombine<max-iterations=1000;no-use-loop-info>,
|
||||||
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>),
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>
|
||||||
require<globals-aa>,
|
),
|
||||||
function(
|
require<globals-aa>,
|
||||||
|
function(
|
||||||
invalidate<aa>
|
invalidate<aa>
|
||||||
),
|
),
|
||||||
require<profile-summary>,
|
require<profile-summary>,
|
||||||
cgscc(
|
cgscc(
|
||||||
devirt<4>(
|
devirt<4>(
|
||||||
inline<only-mandatory>,
|
inline<only-mandatory>,
|
||||||
inline,
|
inline,
|
||||||
@@ -1630,10 +1632,138 @@ function(
|
|||||||
),
|
),
|
||||||
verify
|
verify
|
||||||
)");
|
)");
|
||||||
|
#else
|
||||||
|
array_add(&passes, u8R"(
|
||||||
|
annotation2metadata,
|
||||||
|
forceattrs,
|
||||||
|
inferattrs,
|
||||||
|
function<eager-inv>(
|
||||||
|
lower-expect,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
early-cse<>
|
||||||
|
),
|
||||||
|
ipsccp,
|
||||||
|
called-value-propagation,
|
||||||
|
globalopt,
|
||||||
|
function<eager-inv>(
|
||||||
|
mem2reg,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>
|
||||||
|
),
|
||||||
|
always-inline,
|
||||||
|
require<globals-aa>,
|
||||||
|
function(
|
||||||
|
invalidate<aa>
|
||||||
|
),
|
||||||
|
require<profile-summary>,
|
||||||
|
cgscc(
|
||||||
|
devirt<4>(
|
||||||
|
inline,
|
||||||
|
function-attrs<skip-non-recursive-function-attrs>,
|
||||||
|
function<eager-inv;no-rerun>(
|
||||||
|
early-cse<memssa>,
|
||||||
|
speculative-execution<only-if-divergent-target>,
|
||||||
|
jump-threading,
|
||||||
|
correlated-propagation,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
aggressive-instcombine,
|
||||||
|
tailcallelim,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
reassociate,
|
||||||
|
constraint-elimination,
|
||||||
|
loop-mssa(
|
||||||
|
loop-instsimplify,
|
||||||
|
loop-simplifycfg,
|
||||||
|
licm<no-allowspeculation>,
|
||||||
|
loop-rotate<header-duplication;no-prepare-for-lto>,
|
||||||
|
licm<allowspeculation>,
|
||||||
|
simple-loop-unswitch<no-nontrivial;trivial>
|
||||||
|
),
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop(
|
||||||
|
loop-idiom,
|
||||||
|
indvars,
|
||||||
|
loop-deletion,
|
||||||
|
loop-unroll-full
|
||||||
|
),
|
||||||
|
vector-combine,
|
||||||
|
mldst-motion<no-split-footer-bb>,
|
||||||
|
gvn<>,
|
||||||
|
sccp,
|
||||||
|
bdce,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
jump-threading,
|
||||||
|
correlated-propagation,
|
||||||
|
adce,
|
||||||
|
memcpyopt,
|
||||||
|
dse,
|
||||||
|
move-auto-init,
|
||||||
|
loop-mssa(
|
||||||
|
licm<allowspeculation>
|
||||||
|
),
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>
|
||||||
|
),
|
||||||
|
function-attrs,
|
||||||
|
function(
|
||||||
|
require<should-not-run-function-passes>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
deadargelim,
|
||||||
|
globalopt,
|
||||||
|
globaldce,
|
||||||
|
elim-avail-extern,
|
||||||
|
rpo-function-attrs,
|
||||||
|
recompute-globalsaa,
|
||||||
|
function<eager-inv>(
|
||||||
|
float2int,
|
||||||
|
lower-constant-intrinsics,
|
||||||
|
loop(
|
||||||
|
loop-rotate<header-duplication;no-prepare-for-lto>,
|
||||||
|
loop-deletion
|
||||||
|
),
|
||||||
|
loop-distribute,
|
||||||
|
inject-tli-mappings,
|
||||||
|
loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,
|
||||||
|
infer-alignment,
|
||||||
|
loop-load-elim,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
slp-vectorizer,
|
||||||
|
vector-combine,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop-unroll<O2>,
|
||||||
|
transform-warning,
|
||||||
|
infer-alignment,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop-mssa(
|
||||||
|
licm<allowspeculation>
|
||||||
|
),
|
||||||
|
alignment-from-assumptions,
|
||||||
|
loop-sink,
|
||||||
|
instsimplify,
|
||||||
|
div-rem-pairs,
|
||||||
|
tailcallelim,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>
|
||||||
|
),
|
||||||
|
globaldce,
|
||||||
|
constmerge,
|
||||||
|
cg-profile,
|
||||||
|
rel-lookup-table-converter,
|
||||||
|
function(
|
||||||
|
annotation-remarks
|
||||||
|
),
|
||||||
|
verify
|
||||||
|
)");
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
// default<O2>
|
// default<O2>
|
||||||
// Passes removed: coro, openmp, sroa
|
// Passes removed: coro, openmp, sroa
|
||||||
case 2:
|
case 2:
|
||||||
|
#if LLVM_VERSION_MAJOR == 17
|
||||||
array_add(&passes, u8R"(
|
array_add(&passes, u8R"(
|
||||||
annotation2metadata,
|
annotation2metadata,
|
||||||
forceattrs,
|
forceattrs,
|
||||||
@@ -1758,11 +1888,140 @@ function(
|
|||||||
),
|
),
|
||||||
verify
|
verify
|
||||||
)");
|
)");
|
||||||
|
#else
|
||||||
|
array_add(&passes, u8R"(
|
||||||
|
annotation2metadata,
|
||||||
|
forceattrs,
|
||||||
|
inferattrs,
|
||||||
|
function<eager-inv>(
|
||||||
|
lower-expect,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
early-cse<>
|
||||||
|
),
|
||||||
|
ipsccp,
|
||||||
|
called-value-propagation,
|
||||||
|
globalopt,
|
||||||
|
function<eager-inv>(
|
||||||
|
mem2reg,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>
|
||||||
|
),
|
||||||
|
always-inline,
|
||||||
|
require<globals-aa>,
|
||||||
|
function(
|
||||||
|
invalidate<aa>
|
||||||
|
),
|
||||||
|
require<profile-summary>,
|
||||||
|
cgscc(
|
||||||
|
devirt<4>(
|
||||||
|
inline,
|
||||||
|
function-attrs<skip-non-recursive-function-attrs>,
|
||||||
|
function<eager-inv;no-rerun>(
|
||||||
|
early-cse<memssa>,
|
||||||
|
speculative-execution<only-if-divergent-target>,
|
||||||
|
jump-threading,
|
||||||
|
correlated-propagation,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
aggressive-instcombine,
|
||||||
|
libcalls-shrinkwrap,
|
||||||
|
tailcallelim,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
reassociate,
|
||||||
|
constraint-elimination,
|
||||||
|
loop-mssa(
|
||||||
|
loop-instsimplify,
|
||||||
|
loop-simplifycfg,
|
||||||
|
licm<no-allowspeculation>,
|
||||||
|
loop-rotate<header-duplication;no-prepare-for-lto>,
|
||||||
|
licm<allowspeculation>,
|
||||||
|
simple-loop-unswitch<no-nontrivial;trivial>
|
||||||
|
),
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop(
|
||||||
|
loop-idiom,
|
||||||
|
indvars,
|
||||||
|
loop-deletion,
|
||||||
|
loop-unroll-full
|
||||||
|
),
|
||||||
|
vector-combine,
|
||||||
|
mldst-motion<no-split-footer-bb>,
|
||||||
|
gvn<>,
|
||||||
|
sccp,
|
||||||
|
bdce,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
jump-threading,
|
||||||
|
correlated-propagation,
|
||||||
|
adce,
|
||||||
|
memcpyopt,
|
||||||
|
dse,
|
||||||
|
move-auto-init,
|
||||||
|
loop-mssa(
|
||||||
|
licm<allowspeculation>
|
||||||
|
),
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>
|
||||||
|
),
|
||||||
|
function-attrs,
|
||||||
|
function(
|
||||||
|
require<should-not-run-function-passes>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
deadargelim,
|
||||||
|
globalopt,
|
||||||
|
globaldce,
|
||||||
|
elim-avail-extern,
|
||||||
|
rpo-function-attrs,
|
||||||
|
recompute-globalsaa,
|
||||||
|
function<eager-inv>(
|
||||||
|
float2int,
|
||||||
|
lower-constant-intrinsics,
|
||||||
|
loop(
|
||||||
|
loop-rotate<header-duplication;no-prepare-for-lto>,
|
||||||
|
loop-deletion
|
||||||
|
),
|
||||||
|
loop-distribute,
|
||||||
|
inject-tli-mappings,
|
||||||
|
loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,
|
||||||
|
infer-alignment,
|
||||||
|
loop-load-elim,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
slp-vectorizer,
|
||||||
|
vector-combine,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop-unroll<O2>,
|
||||||
|
transform-warning,
|
||||||
|
infer-alignment,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop-mssa(
|
||||||
|
licm<allowspeculation>
|
||||||
|
),
|
||||||
|
alignment-from-assumptions,
|
||||||
|
loop-sink,
|
||||||
|
instsimplify,
|
||||||
|
div-rem-pairs,
|
||||||
|
tailcallelim,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>
|
||||||
|
),
|
||||||
|
globaldce,
|
||||||
|
constmerge,
|
||||||
|
cg-profile,
|
||||||
|
rel-lookup-table-converter,
|
||||||
|
function(
|
||||||
|
annotation-remarks
|
||||||
|
),
|
||||||
|
verify
|
||||||
|
)");
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
// default<O3>
|
// default<O3>
|
||||||
// Passes removed: coro, openmp, sroa
|
// Passes removed: coro, openmp, sroa
|
||||||
|
#if LLVM_VERSION_MAJOR == 17
|
||||||
array_add(&passes, u8R"(
|
array_add(&passes, u8R"(
|
||||||
annotation2metadata,
|
annotation2metadata,
|
||||||
forceattrs,
|
forceattrs,
|
||||||
@@ -1890,6 +2149,131 @@ function(
|
|||||||
),
|
),
|
||||||
verify
|
verify
|
||||||
)");
|
)");
|
||||||
|
#else
|
||||||
|
array_add(&passes, u8R"(
|
||||||
|
annotation2metadata,
|
||||||
|
forceattrs,
|
||||||
|
inferattrs,
|
||||||
|
function<eager-inv>(
|
||||||
|
lower-expect,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
early-cse<>,
|
||||||
|
callsite-splitting
|
||||||
|
),
|
||||||
|
ipsccp,
|
||||||
|
called-value-propagation,
|
||||||
|
globalopt,
|
||||||
|
function<eager-inv>(
|
||||||
|
mem2reg,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>
|
||||||
|
),
|
||||||
|
always-inline,
|
||||||
|
require<globals-aa>,
|
||||||
|
function(invalidate<aa>),
|
||||||
|
require<profile-summary>,
|
||||||
|
cgscc(
|
||||||
|
devirt<4>(
|
||||||
|
inline,
|
||||||
|
function-attrs<skip-non-recursive-function-attrs>,
|
||||||
|
argpromotion,
|
||||||
|
function<eager-inv;no-rerun>(
|
||||||
|
early-cse<memssa>,
|
||||||
|
speculative-execution<only-if-divergent-target>,
|
||||||
|
jump-threading,
|
||||||
|
correlated-propagation,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
aggressive-instcombine,
|
||||||
|
libcalls-shrinkwrap,
|
||||||
|
tailcallelim,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
reassociate,
|
||||||
|
constraint-elimination,
|
||||||
|
loop-mssa(
|
||||||
|
loop-instsimplify,
|
||||||
|
loop-simplifycfg,
|
||||||
|
licm<no-allowspeculation>,
|
||||||
|
loop-rotate<header-duplication;no-prepare-for-lto>,
|
||||||
|
licm<allowspeculation>,
|
||||||
|
simple-loop-unswitch<nontrivial;trivial>
|
||||||
|
),
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop(
|
||||||
|
loop-idiom,
|
||||||
|
indvars,
|
||||||
|
loop-deletion,
|
||||||
|
loop-unroll-full
|
||||||
|
),
|
||||||
|
vector-combine,
|
||||||
|
mldst-motion<no-split-footer-bb>,
|
||||||
|
gvn<>,
|
||||||
|
sccp,
|
||||||
|
bdce,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
jump-threading,
|
||||||
|
correlated-propagation,
|
||||||
|
adce,
|
||||||
|
memcpyopt,
|
||||||
|
dse,
|
||||||
|
move-auto-init,
|
||||||
|
loop-mssa(licm<allowspeculation>),
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>
|
||||||
|
),
|
||||||
|
function-attrs,
|
||||||
|
function(
|
||||||
|
require<should-not-run-function-passes>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
deadargelim,
|
||||||
|
globalopt,
|
||||||
|
globaldce,
|
||||||
|
elim-avail-extern,
|
||||||
|
rpo-function-attrs,
|
||||||
|
recompute-globalsaa,
|
||||||
|
function<eager-inv>(
|
||||||
|
float2int,
|
||||||
|
lower-constant-intrinsics,
|
||||||
|
chr,
|
||||||
|
loop(
|
||||||
|
loop-rotate<header-duplication;no-prepare-for-lto>,
|
||||||
|
loop-deletion
|
||||||
|
),
|
||||||
|
loop-distribute,
|
||||||
|
inject-tli-mappings,
|
||||||
|
loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,
|
||||||
|
infer-alignment,
|
||||||
|
loop-load-elim,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>,
|
||||||
|
slp-vectorizer,
|
||||||
|
vector-combine,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop-unroll<O3>,
|
||||||
|
transform-warning,
|
||||||
|
infer-alignment,
|
||||||
|
instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,
|
||||||
|
loop-mssa(licm<allowspeculation>),
|
||||||
|
alignment-from-assumptions,
|
||||||
|
loop-sink,
|
||||||
|
instsimplify,
|
||||||
|
div-rem-pairs,
|
||||||
|
tailcallelim,
|
||||||
|
simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>
|
||||||
|
),
|
||||||
|
globaldce,
|
||||||
|
constmerge,
|
||||||
|
cg-profile,
|
||||||
|
rel-lookup-table-converter,
|
||||||
|
function(
|
||||||
|
annotation-remarks
|
||||||
|
),
|
||||||
|
verify
|
||||||
|
)");
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -86,11 +86,8 @@ gb_global Timings global_timings = {0};
|
|||||||
|
|
||||||
#if defined(GB_SYSTEM_OSX)
|
#if defined(GB_SYSTEM_OSX)
|
||||||
#include <llvm/Config/llvm-config.h>
|
#include <llvm/Config/llvm-config.h>
|
||||||
#if LLVM_VERSION_MAJOR < 11
|
#if LLVM_VERSION_MAJOR < 11 || (LLVM_VERSION_MAJOR > 14 && LLVM_VERSION_MAJOR < 17) || LLVM_VERSION_MAJOR > 18
|
||||||
#error LLVM Version 11+ is required => "brew install llvm@11"
|
#error LLVM Version 11..=14 or =18 is required => "brew install llvm@14"
|
||||||
#endif
|
|
||||||
#if (LLVM_VERSION_MAJOR > 14 && LLVM_VERSION_MAJOR < 17) || LLVM_VERSION_MAJOR > 17
|
|
||||||
#error LLVM Version 11..=14 or =17 is required => "brew install llvm@14"
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user