Skip to content
Snippets Groups Projects
Commit 624e1ea2 authored by Daniel Bauer's avatar Daniel Bauer :speech_balloon:
Browse files

reintroduce simplification of conditionals

parent 507d012d
No related branches found
No related tags found
1 merge request!39Pystencils 2.0
Pipeline #67274 skipped
......@@ -27,6 +27,7 @@ from pystencils.backend.ast.structural import PsAssignment, PsBlock, PsLoop
from pystencils.backend.functions import MathFunctions, PsMathFunction
from pystencils.backend.kernelcreation import KernelCreationContext
from pystencils.backend.transformations import (
EliminateBranches,
HoistLoopInvariantDeclarations,
ReshapeLoops,
)
......@@ -178,9 +179,8 @@ class Optimizer:
new_loop, peeled_iters = reshape_loops.peel_loop_back(x_loop, 2)
y_loop.body = PsBlock([new_loop] + list(peeled_iters))
# TODO
# with TimedLogger("simplifying conditionals", logging.DEBUG):
# simplify_conditionals(loop, loop_counter_simplification=True)
with TimedLogger("simplifying conditionals", logging.DEBUG):
loop = EliminateBranches(ctx)(loop)
if self[Opts.MOVECONSTANTS]:
with TimedLogger("moving constants out of loop", logging.DEBUG):
......
......@@ -6,7 +6,7 @@ dependencies = [
"numpy==1.24.3",
"quadpy-gpl==0.16.10",
"poly-cse-py",
"pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@be07c320c7448629ac59a7068a71920dc870a2f2",
"pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@d6621ef950a0f695ea32e8e715f2e64c468248bc",
"pytest==7.3.1",
"sympy==1.11.1",
"tabulate==0.9.0",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment