#NEWLINE# def specialize_abstract_values( fn , abstract_values ) : #NEWLINE# #INDENT# key = ( fn . cache_key , abstract_values ) #NEWLINE# if ( key in _cache ) : #NEWLINE# #INDENT# return _cache [ key ] #NEWLINE# #UNINDENT# if any ( ( has_small_const ( v ) for v in abstract_values ) ) : #NEWLINE# #INDENT# specializer = ValueSpecializer ( abstract_values ) #NEWLINE# transforms = Phase ( [ specializer , Simplify , DCE ] , memoize = False , copy = True , name = ( 'StrideSpecialization for %s' % ( abstract_values , ) ) , recursive = False ) #NEWLINE# new_fn = transforms . apply ( fn ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# new_fn = fn #NEWLINE# #UNINDENT# _cache [ key ] = new_fn #NEWLINE# return new_fn