loki.transformations.tests.test_remove_code

Functions

fixture_source(srcdir)

Write some source files to use in the test

fixture_srcdir()

Create a src directory in the temp directory

test_remove_code_transformation(frontend, ...)

Test the use of code removal utilities, in particular the call removal, via the scheduler.

test_transform_dead_code_conditional(frontend)

Test correct elimination of unreachable conditional branches.

test_transform_dead_code_conditional_nested(...)

Test correct elimination of unreachable branches in nested conditionals.

test_transform_remove_calls(frontend, ...)

Test removal of utility calls and intrinsics with custom patterns.

test_transform_remove_code_pragma_region(...)

Test correct removal of pragma-marked code regions.

fixture_srcdir()

Create a src directory in the temp directory

fixture_source(srcdir)

Write some source files to use in the test

test_transform_dead_code_conditional(frontend)

Test correct elimination of unreachable conditional branches.

test_transform_dead_code_conditional_nested(frontend)

Test correct elimination of unreachable branches in nested conditionals.

test_transform_remove_code_pragma_region(frontend, mark_with_comment)

Test correct removal of pragma-marked code regions.

test_transform_remove_calls(frontend, remove_imports, tmp_path)

Test removal of utility calls and intrinsics with custom patterns.

test_remove_code_transformation(frontend, source, include_intrinsics, kernel_only, tmp_path)

Test the use of code removal utilities, in particular the call removal, via the scheduler.