Skip to content
Snippets Groups Projects
Commit fe86e655 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Merge branch 'filter-hoisted-predicates-by-available-inames' into 'master'

Only consider predicates with usable inames in predicate hoist selection

See merge request !44
parents f02699e7 a377d038
No related branches found
No related tags found
No related merge requests found
......@@ -316,6 +316,8 @@ def build_loop_nest(codegen_state, schedule_index):
recursive calls from doing anything about groups that are too small.
"""
from loopy.symbolic import get_dependencies
# The rough plan here is that build_insn_group starts out with the
# entirety of the current schedule item's downward siblings (i.e. all
# the ones up to the next LeaveLoop). It will then iterate upward to
......@@ -363,6 +365,11 @@ def build_loop_nest(codegen_state, schedule_index):
& sched_index_info_entries[candidate_group_length-1]
.required_predicates)
current_pred_set = frozenset(
pred for pred in current_pred_set
if get_dependencies(pred) & kernel.all_inames()
<= current_iname_set)
# {{{ see which inames are actually used in group
# And only generate conditionals for those.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment