opt-alive: skip tests with -debug-pass-manager with NPM as well
MODIFY
scripts/opt-alive.sh.in
scripts/opt-alive.sh.in
@@ -10,37 +10,47 @@ set -e
# attributor, function-attrs: inter procedural pass that deduces and/or propagates attributes
# metarenamer: anonymizes function names
# sample-profile: inlines functions
-PASSES="-passes= debug-pass-manager argpromotion deadargelim globalopt hotcoldsplit inline ipconstprop ipsccp mergefunc partial-inliner tbaa loop-extract extract-blocks safe-stack place-safepoints attributor function-attrs metarenamer sample-profile lowertypetests extract-blocks openmpopt prune-eh tailcallelim -Os -Oz -O1 -O2 -O3"
+PASSES="argpromotion deadargelim globalopt hotcoldsplit inline ipconstprop ipsccp mergefunc partial-inliner tbaa loop-extract extract-blocks safe-stack place-safepoints attributor function-attrs metarenamer sample-profile lowertypetests extract-blocks openmpopt prune-eh tailcallelim -Os -Oz -O1 -O2 -O3"
PASSREGISTRY="@LLVM_BUILD_MAIN_SRC_DIR@/lib/Passes/PassRegistry.def"
TV="-tv"
+SKIP_TV=0
+for arg in $@; do
+ if [[ $arg == "-debug-pass-manager" ]]; then
+ SKIP_TV=1
+ TV=""
+ break
+ fi
+done
+
NPM_TV=0
for arg in $@; do
# update the -passes argument only.
shift
if [[ $arg == "-passes="* ]]; then
+ TV=""
passes=${arg#-passes=}
passes_new=`@CMAKE_SOURCE_DIR@/scripts/rewritepass.py "$PASSREGISTRY" $passes`
firstpass_level=`echo $passes_new | cut -d "(" -f1`
- if [[ ( $firstpass_level = "module" ) || ( $firstpass_level = "cgscc" ) ]]
- then
- set -- "$@" "$arg"
- else
+ if [[ $SKIP_TV == 0 &&
+ $firstpass_level != "module" && $firstpass_level != "cgscc" ]]; then
set -- "$@" "-passes=module(tv),$passes_new,module(tv)"
NPM_TV=1
+ else
+ set -- "$@" "$arg"
fi
else
if [[ $arg == "-enable-new-pm" ]]; then
NPM_TV=1
fi
set -- "$@" "$arg"
- fi
for p in $PASSES; do
if [[ $arg == *"$p"* ]]; then
TV=""
break
fi
done
+ fi
done
if [[ "$OSTYPE" == "darwin"* ]]; then

opt-alive: skip tests with -debug-pass-manager with NPM as well