diff --git a/loopy/codegen/loop.py b/loopy/codegen/loop.py index 91c8f5499c88f14dc31a720127a1a4afa53865f4..33cdc2118e389ae7b04e43e28a4c6d0e62011751 100644 --- a/loopy/codegen/loop.py +++ b/loopy/codegen/loop.py @@ -329,10 +329,10 @@ def generate_sequential_loop_dim_code(kernel, sched_index, codegen_state): static_lbound = static_min_of_pw_aff( lbound, - constants_only=False, prefer_constants=False) + constants_only=False) static_ubound = static_max_of_pw_aff( ubound, - constants_only=False, prefer_constants=False) + constants_only=False) # }}} diff --git a/loopy/isl_helpers.py b/loopy/isl_helpers.py index 3c429b03214e9a8f00bca899c4eb55f3fa77266f..5c52988926e6714a83a620cfdad1e760fb25c4f2 100644 --- a/loopy/isl_helpers.py +++ b/loopy/isl_helpers.py @@ -137,8 +137,7 @@ def iname_rel_aff(space, iname, rel, aff): raise ValueError("unknown value of 'rel': %s" % rel) -def static_extremum_of_pw_aff(pw_aff, constants_only, set_method, what, context, - prefer_constants): +def static_extremum_of_pw_aff(pw_aff, constants_only, set_method, what, context): if context is not None: context = isl.align_spaces(context, pw_aff.get_domain_space(), obj_bigger_ok=True).params() @@ -163,21 +162,12 @@ def static_extremum_of_pw_aff(pw_aff, constants_only, set_method, what, context, .is_bounded()) # put constant bounds with unbounded validity first - # FIXME: Heuristi-hack. - if prefer_constants: - order = [ - (True, False), # constant, unbounded validity - (False, False), # nonconstant, unbounded validity - (True, True), # constant, bounded validity - (False, True), # nonconstant, bounded validity - ] - else: - order = [ - (False, False), # nonconstant, unbounded validity - (True, False), # constant, unbounded validity - (False, True), # nonconstant, bounded validity - (True, True), # constant, bounded validity - ] + order = [ + (True, False), # constant, unbounded validity + (False, False), # nonconstant, unbounded validity + (True, True), # constant, bounded validity + (False, True), # nonconstant, bounded validity + ] pieces = flatten([ [(set, aff) for set, aff in pieces @@ -209,22 +199,19 @@ def static_extremum_of_pw_aff(pw_aff, constants_only, set_method, what, context, % (what, pw_aff)) -def static_min_of_pw_aff(pw_aff, constants_only, context=None, - prefer_constants=True): +def static_min_of_pw_aff(pw_aff, constants_only, context=None): return static_extremum_of_pw_aff(pw_aff, constants_only, isl.PwAff.ge_set, - "minimum", context, prefer_constants) + "minimum", context) -def static_max_of_pw_aff(pw_aff, constants_only, context=None, - prefer_constants=True): +def static_max_of_pw_aff(pw_aff, constants_only, context=None): return static_extremum_of_pw_aff(pw_aff, constants_only, isl.PwAff.le_set, - "maximum", context, prefer_constants) + "maximum", context) -def static_value_of_pw_aff(pw_aff, constants_only, context=None, - prefer_constants=True): +def static_value_of_pw_aff(pw_aff, constants_only, context=None): return static_extremum_of_pw_aff(pw_aff, constants_only, isl.PwAff.eq_set, - "value", context, prefer_constants) + "value", context) def duplicate_axes(isl_obj, duplicate_inames, new_inames):