mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-18 06:28:21 +02:00
nir/meson: drop redundant --build-tests in favour of just checking if --out-tests is set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39350>
This commit is contained in:
parent
246095da49
commit
30c2e6dbf2
2 changed files with 10 additions and 12 deletions
|
|
@ -46,7 +46,7 @@ nir_opt_algebraic = custom_target(
|
|||
input : 'nir_opt_algebraic.py',
|
||||
output : ['nir_opt_algebraic.c'] + (with_tests ? ['nir_opt_algebraic_pattern_test.cpp'] : []),
|
||||
command : [prog_python, '@INPUT@', '--out', '@OUTPUT0@'] +
|
||||
(with_tests ? ['--build-tests', '--out-tests', '@OUTPUT1@'] : []),
|
||||
(with_tests ? ['--out-tests', '@OUTPUT1@'] : []),
|
||||
depend_files : nir_algebraic_depends,
|
||||
)
|
||||
nir_opt_algebraic_c = nir_opt_algebraic[0]
|
||||
|
|
|
|||
|
|
@ -4283,57 +4283,55 @@ for s in [8, 16]:
|
|||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--out', required=True)
|
||||
parser.add_argument('--out-tests')
|
||||
parser.add_argument('--build-tests', action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.build_tests and not args.out_tests:
|
||||
parser.error("--build-tests requires --out-tests")
|
||||
build_tests = args.out_tests is not None
|
||||
|
||||
passes = []
|
||||
|
||||
passes.append(nir_algebraic.AlgebraicPass(
|
||||
"nir_opt_algebraic",
|
||||
optimizations,
|
||||
build_tests=args.build_tests
|
||||
build_tests=build_tests
|
||||
))
|
||||
|
||||
passes.append(nir_algebraic.AlgebraicPass(
|
||||
"nir_opt_algebraic_before_ffma",
|
||||
before_ffma_optimizations,
|
||||
build_tests=args.build_tests
|
||||
build_tests=build_tests
|
||||
))
|
||||
|
||||
passes.append(nir_algebraic.AlgebraicPass(
|
||||
"nir_opt_algebraic_before_lower_int64",
|
||||
before_lower_int64_optimizations,
|
||||
build_tests=args.build_tests
|
||||
build_tests=build_tests
|
||||
))
|
||||
|
||||
passes.append(nir_algebraic.AlgebraicPass(
|
||||
"nir_opt_algebraic_late",
|
||||
late_optimizations,
|
||||
build_tests=args.build_tests
|
||||
build_tests=build_tests
|
||||
))
|
||||
|
||||
passes.append(nir_algebraic.AlgebraicPass(
|
||||
"nir_opt_algebraic_distribute_src_mods",
|
||||
distribute_src_mods,
|
||||
build_tests=args.build_tests
|
||||
build_tests=build_tests
|
||||
))
|
||||
|
||||
passes.append(nir_algebraic.AlgebraicPass(
|
||||
"nir_opt_algebraic_integer_promotion",
|
||||
integer_promotion_optimizations,
|
||||
build_tests=args.build_tests
|
||||
build_tests=build_tests
|
||||
))
|
||||
|
||||
passes.append(nir_algebraic.AlgebraicPass(
|
||||
"nir_opt_reassociate_matrix_mul",
|
||||
mat_mul_optimizations,
|
||||
build_tests=args.build_tests
|
||||
build_tests=build_tests
|
||||
))
|
||||
|
||||
if args.build_tests:
|
||||
if build_tests:
|
||||
with open(args.out_tests, "w", encoding='utf-8') as f:
|
||||
for p in passes:
|
||||
f.write(p.render_tests())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue