You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

244 lines
36 KiB

${XCODE_ISYSROOT}/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h, NSArray.enumerateObjectsUsingBlock:[objc_blockMyBlock.call_enumerate_via_block_param_linear_FN::_3], 0, OnUIThread:false, []
${XCODE_ISYSROOT}/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h, NSArray.enumerateObjectsUsingBlock:[objc_blockenumerate_via_block_linear_2], 0, OnUIThread:false, []
${XCODE_ISYSROOT}/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h, NSArray.indexOfObject:inSortedRange:options:usingComparator:[objc_blocknsarray_binary_search_log_FN_1], 0, OnUIThread:false, []
codetoanalyze/objc/performance/MyEnumerator.m, MyEnumerator.dealloc, 1, OnUIThread:false, []
codetoanalyze/objc/performance/MyEnumerator.m, MyEnumerator.nextObject, 6 + 3 ⋅ self->n.ub + 3 ⋅ (1+max(0, self->n.ub)), OnUIThread:false, [{1+max(0, self->n.ub)},Loop,{self->n.ub},Loop]
codetoanalyze/objc/performance/NSArray.m, MyBlock.call_enumerate_via_block_param_linear_FN::, 6, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, MyBlock.dealloc, 1, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, call_my_enumerator_next_object_linear, 9 + 3 ⋅ enumerator->n.ub + 3 ⋅ (1+max(0, enumerator->n.ub)), OnUIThread:false, [{1+max(0, enumerator->n.ub)},Call to MyEnumerator.nextObject,Loop,{enumerator->n.ub},Call to MyEnumerator.nextObject,Loop]
codetoanalyze/objc/performance/NSArray.m, call_nsarray_enumerator_param_linear, 6, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, enumerate_via_block_linear, 2 + array->elements.length.ub, OnUIThread:false, [{array->elements.length.ub},Modeled call to enumerateObjectsUsingBlock:]
codetoanalyze/objc/performance/NSArray.m, loop_with_my_enumerator_next_object_linear_FP, 2 + 3 ⋅ enumerator->n.ub × (enumerator.length + 1) + 10 ⋅ (enumerator.length + 1) + 3 ⋅ (enumerator.length + 1) × (1+max(0, enumerator->n.ub)), OnUIThread:false, [{1+max(0, enumerator->n.ub)},Call to MyEnumerator.nextObject,Loop,{enumerator.length + 1},Loop,{enumerator.length + 1},Loop,{enumerator->n.ub},Call to MyEnumerator.nextObject,Loop]
[clang] fix bad interaction between ConditionalOperator and initializers Summary: This is several inter-connected changes together to keep the tests happy. The ConditionalOperator `b?t:e` is translated by first creating a placeholder variable to temporarily store the result of the evaluation in each branch, then the real thing we want to assign to reads that variable. But, there are situations where that changes the semantics of the expression, namely when the value created is a struct on the stack (eg, a C++ temporary). This is because in SIL we cannot assign the *address* of a program variable, only its contents, so by the time we're out of the conditional operator we cannot set the struct value correctly anymore: we can only set its content, which we did, but that results in a "shifted" struct value that is one dereference away from where it should be. So a batch of changes concern `conditionalOperator_trans`: - instead of systematically creating a temporary for the conditional, use the `trans_state.var_exp_typ` provided from above if available when translating `ConditionalOperator` - don't even set anything if that variable was already initialized by merely translating the branch expression, eg when it's a constructor - fix long-standing TODO to propagate these initialization facts accurately for ConditionalOperator (used by `init_expr_trans` to also figure out if it should insert a store to the variable being initialised or not) The rest of the changes adapt some relevant other constructs to deal with conditionalOperator properly now that it can set the current variable itself, instead of storing stuff inside a temp variable. This change was a problem because some constructs, eg a variable declaration, will insert nodes that set up the variable before calling its initialization, and now the initialization happens *before* that setup, in the translation of the inner conditional operator, which naturally creates nodes above the current one. - add a generic helper to force a sequential order between two translation results, forcing node creation if necessary - use that in `init_expr_trans` and `cxxNewExpr_trans` - adjust many places where `var_exp_typ` was incorrectly not reset when translating sub-expressions The sequentiality business creates more nodes when used, and the conditionalOperator business uses fewer temporary variables, so the frontend results change quite a bit. Note that biabduction tests were invaluable in debugging this. There could be other constructs to adjust similarly to cxxNewExpr that were not covered by the tests though. Added tests in pulse that exercises the previous bug. Reviewed By: da319 Differential Revision: D24796282 fbshipit-source-id: 0790c8d17
4 years ago
codetoanalyze/objc/performance/NSArray.m, multiple_nsarray_enumerators_param_linear, 10 + 5 ⋅ (enumerator2.length + enumerator1.length + 2), OnUIThread:false, [{enumerator2.length + enumerator1.length + 2},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_access_constant, 50, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_access_linear, 3 + 7 ⋅ array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_add_object_constant, 8, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_add_objects_from_array_linear, 9 + 3 ⋅ append_array->elements.length.ub + append_array->elements.length.ub + 3 ⋅ (append_array->elements.length.ub + 1), OnUIThread:false, [{append_array->elements.length.ub + 1},Loop,{append_array->elements.length.ub},Modeled call to NSArray.arrayByAddingObjectsFromArray:,{append_array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_array_with_objects_constant, 47, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_binary_search_log_FN, 10, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_contains_object_linear, 3 + array->elements.length.ub, OnUIThread:false, [{array->elements.length.ub},Modeled call to NSArray.containsObject:]
codetoanalyze/objc/performance/NSArray.m, nsarray_copy_linear, 6 + 3 ⋅ array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_count_bounded_linear, 3 + 3 ⋅ array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_empty_array_constant, 8, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_enumerator_linear, 6 + 8 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_enumerator_param_linear, 2 + 5 ⋅ (enumerator.length + 1), OnUIThread:false, [{enumerator.length + 1},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_find_linear, 4 + 9 ⋅ array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_first_object_constant, 4, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_get_first_constant, 27, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_init_constant, 9, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_init_with_array_constant, 14, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_init_with_array_copy_linear, 7 + 3 ⋅ array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_init_with_array_linear, 6 + 3 ⋅ array->elements.length.ub + array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Modeled call to NSArray.initWithArray:,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_init_with_objects_constant, 39, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_is_equal_to_array_linear, 4 + array1->elements.length.ub, OnUIThread:false, [{array1->elements.length.ub},Modeled call to NSArray.isEqualToArray:]
codetoanalyze/objc/performance/NSArray.m, nsarray_iterate_linear, 6 + 8 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_last_object_constant, 4, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_next_object_constant, 26, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_next_object_linear, 5 + 5 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSArray.m, nsarray_object_at_indexed_constant, 34, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_sort_using_descriptors_constant, 39, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, nsarray_sort_using_descriptors_nlogn, 9 + array->elements.length.ub × log(array->elements.length.ub), OnUIThread:false, [{array->elements.length.ub},Modeled call to NSArray.sortedArrayUsingDescriptors:,{array->elements.length.ub},Modeled call to NSArray.sortedArrayUsingDescriptors:]
codetoanalyze/objc/performance/NSArray.m, objc_blockMyBlock.call_enumerate_via_block_param_linear_FN::_3, 3 + 3 ⋅ size + 2 ⋅ (1+max(0, size)), OnUIThread:false, [{1+max(0, size)},Loop,{size},Loop]
codetoanalyze/objc/performance/NSArray.m, objc_blockenumerate_via_block_linear_2, 1, OnUIThread:false, []
codetoanalyze/objc/performance/NSArray.m, objc_blocknsarray_binary_search_log_FN_1, 5, OnUIThread:false, []
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_all_keys_linear1, 3 + 3 ⋅ dict->elements.length.ub + 4 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop,{dict->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_all_keys_linear2, 6 + 3 ⋅ dict->elements.length.ub + 3 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop,{dict->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_all_values_linear, 3 + 3 ⋅ dict->elements.length.ub + 4 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop,{dict->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_alloc_with_zone_init_with_dictionary_linear, 7 + 3 ⋅ dict->elements.length.ub + 4 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop,{dict->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_dictionary_constant, 13, OnUIThread:false, []
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_dictionary_with_objects_linear, 14 + 15 ⋅ n_entries + 3 ⋅ n_entries + 2 ⋅ (1+max(0, n_entries)) + 4 ⋅ (1+max(0, n_entries)), OnUIThread:false, [{1+max(0, n_entries)},Loop,{1+max(0, n_entries)},Loop,{n_entries},Loop,{n_entries},Loop]
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_enumerate_call_constant, 65, OnUIThread:false, []
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_enumerate_constant, 74, OnUIThread:false, []
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_enumerator_linear, 5 + 5 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_fast_enumerate_linear, 5 + 5 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_find_key_constant, 19, OnUIThread:false, []
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_init_dictionary_constant, 3, OnUIThread:false, []
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_init_literal_constant, 45, OnUIThread:false, []
codetoanalyze/objc/performance/NSDictionary.m, nsdictionary_init_with_dictionary_linear, 7 + 3 ⋅ dict->elements.length.ub + 4 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop,{dict->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSEnumeration.m, call_loop_enumerator_constant, 35, OnUIThread:false, []
codetoanalyze/objc/performance/NSEnumeration.m, call_loop_id_enumerator_linear, 7 + 5 ⋅ (arr->elements.length.ub + 1), OnUIThread:false, [{arr->elements.length.ub + 1},Call to loop_id_enumerator_linear,Loop]
codetoanalyze/objc/performance/NSEnumeration.m, loop_enumerator_linear, 5 + 5 ⋅ (enumeration->elements.length.ub + 1), OnUIThread:false, [{enumeration->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSEnumeration.m, loop_enumerator_over_class_linear, 5 + 5 ⋅ (a->elements.length.ub + 1), OnUIThread:false, [{a->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSEnumeration.m, loop_id_enumerator_linear, 5 + 5 ⋅ (enumeration->elements.length.ub + 1), OnUIThread:false, [{enumeration->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSFileManager.m, contents_of_directory_at_url_constant, 11, OnUIThread:false, []
codetoanalyze/objc/performance/NSInteger.m, nsinteger_value_linear, 3 + 3 ⋅ integer + 2 ⋅ (1+max(0, integer)), OnUIThread:false, [{1+max(0, integer)},Loop,{integer},Loop]
codetoanalyze/objc/performance/NSInteger.m, nsnumber_number_with_int_integer_value_constant, 34, OnUIThread:false, []
codetoanalyze/objc/performance/NSKeyedUnarchiver.m, decode_object_for_key_linear, 9 + 3 ⋅ keyed_unarchiver->elements[*].ub + 2 ⋅ (1+max(0, keyed_unarchiver->elements[*].ub)), OnUIThread:false, [{1+max(0, keyed_unarchiver->elements[*].ub)},Loop,{keyed_unarchiver->elements[*].ub},Loop]
codetoanalyze/objc/performance/NSMutableArray.m, nsarray_new_constant, 9, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_add_all_constant, 23, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_add_in_loop_constant, 152, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_add_in_loop_linear, 8 + 7 ⋅ n + 3 ⋅ n + 2 ⋅ (n + 1) + 3 ⋅ (n + 1), OnUIThread:false, [{n + 1},Loop,{n + 1},Loop,{n},Loop,{n},Loop]
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_add_in_loop_quadratic, 6 + 5 ⋅ n + 8 ⋅ n × m + 2 ⋅ n × (m + 1) + 2 ⋅ (n + 1), OnUIThread:false, [{n + 1},Loop,{m + 1},Loop,{m},Loop,{n},Loop]
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_add_then_loop_constant, 108, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_empty_ok_costant, 7, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_init_with_capacity_constant, 4617, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_remove_all_linear, 4 + 3 ⋅ array->elements.length.ub + array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Modeled call to NSArray.removeAllObjects,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_remove_constant, 17, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_remove_in_loop_constant, 182, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_set_in_loop_constant, 51, OnUIThread:false, []
codetoanalyze/objc/performance/NSMutableArray.m, nsmarray_set_linear, 3 + 11 ⋅ array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSMutableDictionary.m, nsmutabledictionary_set_element_in_loop_linear, 5 + 9 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSMutableString.m, copy_string_constant_FP, 11 + 3 ⋅ str3.length.ub + str3.length.ub + 3 ⋅ (str3.length.ub + 1), OnUIThread:false, [{str3.length.ub + 1},Loop,{str3.length.ub},Modeled call to NSMutableString.appendString:,{str3.length.ub},Loop]
codetoanalyze/objc/performance/NSMutableString.m, nsmstring_append_string_constant, 14 + 3 ⋅ (str.length.ub + 5) + 3 ⋅ (str.length.ub + 6), OnUIThread:false, [{str.length.ub + 6},Loop,{str.length.ub + 5},Loop]
codetoanalyze/objc/performance/NSMutableString.m, nsmstring_append_string_linear, 5 + str2.length.ub + 3 ⋅ (str2.length.ub + str1.length.ub) + 3 ⋅ (str2.length.ub + str1.length.ub + 1), OnUIThread:false, [{str2.length.ub + str1.length.ub + 1},Loop,{str2.length.ub + str1.length.ub},Loop,{str2.length.ub},Modeled call to NSMutableString.appendString:]
codetoanalyze/objc/performance/NSOrderedSet.m, nsordered_set_empty_constant, 14, OnUIThread:false, []
codetoanalyze/objc/performance/NSOrderedSet.m, nsordered_set_iterate_linear, 5 + 5 ⋅ (ordered_set->elements.length.ub + 1), OnUIThread:false, [{ordered_set->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSOrderedSet.m, nsordered_set_with_array_linear, 10 + 5 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Call to nsordered_set_iterate_linear,Loop]
codetoanalyze/objc/performance/NSSet.m, nsset_enumerator_linear, 6 + 8 ⋅ (set->elements.length.ub + 1), OnUIThread:false, [{set->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSSet.m, nsset_init_constant, 9, OnUIThread:false, []
codetoanalyze/objc/performance/NSSet.m, nsset_init_with_array_linear, 7 + 3 ⋅ array->elements.length.ub + 3 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop,{array->elements.length.ub},Loop]
codetoanalyze/objc/performance/NSSet.m, nsset_init_with_set_constant, 6, OnUIThread:false, []
codetoanalyze/objc/performance/NSSet.m, nsset_iterate_linear, 6 + 8 ⋅ (set->elements.length.ub + 1), OnUIThread:false, [{set->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSSet.m, nsset_next_object_linear, 5 + 5 ⋅ (set->elements.length.ub + 1), OnUIThread:false, [{set->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/NSString.m, DummyClass.call_string_by_appending_string_constant_FP, , OnUIThread:false, [Unbounded loop,Modeled call to NSString.stringByAppendingString:]
codetoanalyze/objc/performance/NSString.m, DummyClass.dealloc, 1, OnUIThread:false, []
codetoanalyze/objc/performance/NSString.m, call_component_separated_by_char_constant, 46, OnUIThread:false, []
codetoanalyze/objc/performance/NSString.m, call_init_with_string_constant, 15, OnUIThread:false, []
codetoanalyze/objc/performance/NSString.m, component_seperated_by_char_linear, 6 + m.length.ub + 3 ⋅ (-1+max(2, m.length.ub)) + 3 ⋅ (max(2, m.length.ub)), OnUIThread:false, [{max(2, m.length.ub)},Loop,{-1+max(2, m.length.ub)},Loop,{m.length.ub},Modeled call to NSString.componentsSeparatedByString:]
codetoanalyze/objc/performance/NSString.m, component_seperated_by_string_linear, 6 + sep.length.ub × m.length.ub + 3 ⋅ (-1+max(2, m.length.ub)) + 3 ⋅ (max(2, m.length.ub)), OnUIThread:false, [{max(2, m.length.ub)},Loop,{-1+max(2, m.length.ub)},Loop,{m.length.ub},Modeled call to NSString.componentsSeparatedByString:,{sep.length.ub},Modeled call to NSString.componentsSeparatedByString:]
[clang] fix bad interaction between ConditionalOperator and initializers Summary: This is several inter-connected changes together to keep the tests happy. The ConditionalOperator `b?t:e` is translated by first creating a placeholder variable to temporarily store the result of the evaluation in each branch, then the real thing we want to assign to reads that variable. But, there are situations where that changes the semantics of the expression, namely when the value created is a struct on the stack (eg, a C++ temporary). This is because in SIL we cannot assign the *address* of a program variable, only its contents, so by the time we're out of the conditional operator we cannot set the struct value correctly anymore: we can only set its content, which we did, but that results in a "shifted" struct value that is one dereference away from where it should be. So a batch of changes concern `conditionalOperator_trans`: - instead of systematically creating a temporary for the conditional, use the `trans_state.var_exp_typ` provided from above if available when translating `ConditionalOperator` - don't even set anything if that variable was already initialized by merely translating the branch expression, eg when it's a constructor - fix long-standing TODO to propagate these initialization facts accurately for ConditionalOperator (used by `init_expr_trans` to also figure out if it should insert a store to the variable being initialised or not) The rest of the changes adapt some relevant other constructs to deal with conditionalOperator properly now that it can set the current variable itself, instead of storing stuff inside a temp variable. This change was a problem because some constructs, eg a variable declaration, will insert nodes that set up the variable before calling its initialization, and now the initialization happens *before* that setup, in the translation of the inner conditional operator, which naturally creates nodes above the current one. - add a generic helper to force a sequential order between two translation results, forcing node creation if necessary - use that in `init_expr_trans` and `cxxNewExpr_trans` - adjust many places where `var_exp_typ` was incorrectly not reset when translating sub-expressions The sequentiality business creates more nodes when used, and the conditionalOperator business uses fewer temporary variables, so the frontend results change quite a bit. Note that biabduction tests were invaluable in debugging this. There could be other constructs to adjust similarly to cxxNewExpr that were not covered by the tests though. Added tests in pulse that exercises the previous bug. Reviewed By: da319 Differential Revision: D24796282 fbshipit-source-id: 0790c8d17
4 years ago
codetoanalyze/objc/performance/NSString.m, has_prefix_constant, 11, OnUIThread:false, []
codetoanalyze/objc/performance/NSString.m, init_string_constant, 9, OnUIThread:false, []
codetoanalyze/objc/performance/NSString.m, init_with_bytes_linear, 9 + 3 ⋅ length + 3 ⋅ (length + 1), OnUIThread:false, [{length + 1},Loop,{length},Loop]
codetoanalyze/objc/performance/NSString.m, init_with_string_constant, 39, OnUIThread:false, []
codetoanalyze/objc/performance/NSString.m, init_with_string_linear, 7 + 3 ⋅ s.length.ub + 3 ⋅ (s.length.ub + 1), OnUIThread:false, [{s.length.ub + 1},Loop,{s.length.ub},Loop]
codetoanalyze/objc/performance/NSString.m, rangeof_character_from_set_linear, 5 + m.length.ub, OnUIThread:false, [{m.length.ub},Modeled call to NSString.rangeOfString:]
codetoanalyze/objc/performance/NSString.m, rangeof_string_quadratic, 5 + n.length.ub × m.length.ub, OnUIThread:false, [{m.length.ub},Modeled call to NSString.rangeOfString:,{n.length.ub},Modeled call to NSString.rangeOfString:]
codetoanalyze/objc/performance/NSString.m, replace_linear_FP, , OnUIThread:false, [Unbounded loop,Loop]
codetoanalyze/objc/performance/NSString.m, string_by_appending_path_component_linear, 4 + path.length.ub + file.length.ub, OnUIThread:false, [{file.length.ub},Modeled call to NSString.stringByAppendingPathComponent:,{path.length.ub},Modeled call to NSString.stringByAppendingPathComponent:]
codetoanalyze/objc/performance/NSString.m, string_by_appending_same_string_linear, 11 + s.length.ub + 3 ⋅ (s.length.ub + 2) + 3 ⋅ (s.length.ub + 3), OnUIThread:false, [{s.length.ub + 3},Loop,{s.length.ub + 2},Loop,{s.length.ub},Modeled call to NSString.stringByAppendingString:]
codetoanalyze/objc/performance/NSString.m, string_by_appending_string_linear, 8 + m.length.ub + 3 ⋅ (m.length.ub + s.length.ub) + s.length.ub + 3 ⋅ (m.length.ub + s.length.ub + 1), OnUIThread:false, [{m.length.ub + s.length.ub + 1},Loop,{s.length.ub},Modeled call to NSString.stringByAppendingString:,{m.length.ub + s.length.ub},Loop,{m.length.ub},Modeled call to NSString.stringByAppendingString:]
codetoanalyze/objc/performance/NSString.m, string_has_prefix_linear, 4 + str.length.ub, OnUIThread:false, [{str.length.ub},Modeled call to NSString.hasPrefix:]
codetoanalyze/objc/performance/NSString.m, string_is_equal_to_string_linear, 4 + str1.length.ub, OnUIThread:false, [{str1.length.ub},Modeled call to NSString.isEqualToString:]
codetoanalyze/objc/performance/NSString.m, string_length_linear, 3 + 3 ⋅ s.length.ub + 4 ⋅ (s.length.ub + 1), OnUIThread:false, [{s.length.ub + 1},Loop,{s.length.ub},Loop]
codetoanalyze/objc/performance/NSString.m, string_with_utf8_string_linear, 7 + 3 ⋅ p->strlen.ub + p->strlen.ub + 4 ⋅ (p->strlen.ub + 1), OnUIThread:false, [{p->strlen.ub + 1},Loop,{p->strlen.ub},Modeled call to NSString.stringWithUTF8String:,{p->strlen.ub},Loop]
codetoanalyze/objc/performance/NSString.m, substring_no_end_linear, 10 + 6 ⋅ (-x + s.length.ub), OnUIThread:false, [{-x + s.length.ub},Loop]
codetoanalyze/objc/performance/NSURL.m, get_resource_value_constant, 16, OnUIThread:false, []
codetoanalyze/objc/performance/NSURL.m, path_linear, 6 + 3 ⋅ url.length.ub + 3 ⋅ (url.length.ub + 1), OnUIThread:false, [{url.length.ub + 1},Loop,{url.length.ub},Loop]
codetoanalyze/objc/performance/araii.m, Araii.buffer, 4, OnUIThread:false, []
codetoanalyze/objc/performance/araii.m, Araii.dealloc, 4, OnUIThread:false, []
codetoanalyze/objc/performance/araii.m, Araii.initWithBuffer, 15, OnUIThread:false, []
codetoanalyze/objc/performance/araii.m, Araii.setBuffer:, 4, OnUIThread:false, []
codetoanalyze/objc/performance/araii.m, memory_leak_raii_main, 18, OnUIThread:false, []
codetoanalyze/objc/performance/block.m, block_multiply_array_linear, 13 + 9 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Call to objc_blockblock_multiply_array_linear_1,Loop]
codetoanalyze/objc/performance/block.m, call_wrapper_runBlockA_linear, 11 + 3 ⋅ a + 2 ⋅ (1+max(0, a)), OnUIThread:false, [{1+max(0, a)},Call to loop_linear,Loop,{a},Call to loop_linear,Loop]
codetoanalyze/objc/performance/block.m, doBlockA_direct_block_linear, 10 + 3 ⋅ a + 2 ⋅ (1+max(0, a)), OnUIThread:false, [{1+max(0, a)},Call to runBlockA[objc_blockdoBlockA_direct_block_linear_3],Call to objc_blockdoBlockA_direct_block_linear_3,Call to loop_linear,Loop,{a},Call to runBlockA[objc_blockdoBlockA_direct_block_linear_3],Call to objc_blockdoBlockA_direct_block_linear_3,Call to loop_linear,Loop]
codetoanalyze/objc/performance/block.m, doBlockA_linear, 12 + 3 ⋅ a + 2 ⋅ (1+max(0, a)), OnUIThread:false, [{1+max(0, a)},Call to runBlockA[objc_blockdoBlockA_linear_2],Call to objc_blockdoBlockA_linear_2,Call to loop_linear,Loop,{a},Call to runBlockA[objc_blockdoBlockA_linear_2],Call to objc_blockdoBlockA_linear_2,Call to loop_linear,Loop]
codetoanalyze/objc/performance/block.m, loop_linear, 3 + 3 ⋅ x + 2 ⋅ (1+max(0, x)), OnUIThread:false, [{1+max(0, x)},Loop,{x},Loop]
codetoanalyze/objc/performance/block.m, objc_blockblock_multiply_array_linear_1, 8 + 9 ⋅ (array->elements.length.ub + 1), OnUIThread:false, [{array->elements.length.ub + 1},Loop]
codetoanalyze/objc/performance/block.m, objc_blockcall_wrapper_runBlockA_linear_4, 5 + 3 ⋅ a + 2 ⋅ (1+max(0, a)), OnUIThread:false, [{1+max(0, a)},Call to loop_linear,Loop,{a},Call to loop_linear,Loop]
codetoanalyze/objc/performance/block.m, objc_blockdoBlockA_direct_block_linear_3, 5 + 3 ⋅ a + 2 ⋅ (1+max(0, a)), OnUIThread:false, [{1+max(0, a)},Call to loop_linear,Loop,{a},Call to loop_linear,Loop]
codetoanalyze/objc/performance/block.m, objc_blockdoBlockA_linear_2, 5 + 3 ⋅ a + 2 ⋅ (1+max(0, a)), OnUIThread:false, [{1+max(0, a)},Call to loop_linear,Loop,{a},Call to loop_linear,Loop]
codetoanalyze/objc/performance/block.m, runBlockA, 2 + |block|, OnUIThread:false, []
codetoanalyze/objc/performance/block.m, runBlockA[objc_blockdoBlockA_direct_block_linear_3], 8 + 3 ⋅ a[doBlockA_direct_block_linear()] + 2 ⋅ (1+max(0, a[doBlockA_direct_block_linear()])), OnUIThread:false, [{1+max(0, a[doBlockA_direct_block_linear()])},Call to objc_blockdoBlockA_direct_block_linear_3,Call to loop_linear,Loop,{a[doBlockA_direct_block_linear()]},Call to objc_blockdoBlockA_direct_block_linear_3,Call to loop_linear,Loop]
codetoanalyze/objc/performance/block.m, runBlockA[objc_blockdoBlockA_linear_2], 8 + 3 ⋅ a[doBlockA_linear()] + 2 ⋅ (1+max(0, a[doBlockA_linear()])), OnUIThread:false, [{1+max(0, a[doBlockA_linear()])},Call to objc_blockdoBlockA_linear_2,Call to loop_linear,Loop,{a[doBlockA_linear()]},Call to objc_blockdoBlockA_linear_2,Call to loop_linear,Loop]
codetoanalyze/objc/performance/block.m, wrapper_runBlockA, 4 + |block|, OnUIThread:false, []
codetoanalyze/objc/performance/block.m, wrapper_runBlockA[objc_blockcall_wrapper_runBlockA_linear_4], 4 + |block|, OnUIThread:false, []
codetoanalyze/objc/performance/break.m, break_constant_FP, 8 + 5 ⋅ p + 2 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},Call to break_loop,Loop,{p},Call to break_loop,Loop]
codetoanalyze/objc/performance/break.m, break_loop, 5 + 5 ⋅ p + 2 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},Loop,{p},Loop]
codetoanalyze/objc/performance/break.m, break_loop_with_t, 7 + 5 ⋅ p + 2 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},Loop,{p},Loop]
codetoanalyze/objc/performance/cf.m, array_count_linear, 6 + 3 ⋅ arr->elements.length.ub + 2 ⋅ (arr->elements.length.ub + 1), OnUIThread:false, [{arr->elements.length.ub + 1},Loop,{arr->elements.length.ub},Loop]
codetoanalyze/objc/performance/cf.m, cf_array_create_copy_linear, 8 + 3 ⋅ arrayValues.elements.length + 2 ⋅ (arrayValues.elements.length + 1), OnUIThread:false, [{arrayValues.elements.length + 1},Loop,{arrayValues.elements.length},Loop]
codetoanalyze/objc/performance/cf.m, cf_array_create_linear, 11 + 3 ⋅ x + 2 ⋅ (1+max(0, x)), OnUIThread:false, [{1+max(0, x)},Loop,{x},Loop]
codetoanalyze/objc/performance/cf.m, dict_count_linear, 6 + 3 ⋅ dict->elements.length.ub + 2 ⋅ (dict->elements.length.ub + 1), OnUIThread:false, [{dict->elements.length.ub + 1},Loop,{dict->elements.length.ub},Loop]
codetoanalyze/objc/performance/compound_loop_guard.m, compound_while, 7 + 3 ⋅ m + 4 ⋅ (1+max(0, m)), OnUIThread:false, [{1+max(0, m)},Loop,{m},Loop]
codetoanalyze/objc/performance/compound_loop_guard.m, nested_while_and_or_constant, 20, OnUIThread:false, []
codetoanalyze/objc/performance/compound_loop_guard.m, simplified_simulated_while_with_and_constant, 605, OnUIThread:false, []
codetoanalyze/objc/performance/compound_loop_guard.m, simulated_nested_loop_with_and_constant, 3529, OnUIThread:false, []
codetoanalyze/objc/performance/compound_loop_guard.m, simulated_while_shortcut_constant, 9, OnUIThread:false, []
codetoanalyze/objc/performance/compound_loop_guard.m, simulated_while_with_and_linear, 6 + 3 ⋅ p + 4 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},Loop,{p},Loop]
codetoanalyze/objc/performance/compound_loop_guard.m, while_and_or, , OnUIThread:false, [Unbounded loop,Loop]
codetoanalyze/objc/performance/control.m, __infer_globals_initializer_gvar, 2, OnUIThread:false, []
codetoanalyze/objc/performance/control.m, wrong_cvar_FP, , OnUIThread:false, [Unbounded loop,Loop]
codetoanalyze/objc/performance/copy_test.m, MyCopyObj.copyWithZone:, 22, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test.m, MyCopyObj.dealloc, 4, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test.m, MyCopyObj.mObjects, 4, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test.m, MyCopyObj.objects, 7, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test.m, MyCopyObj.setMObjects:, 4, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test.m, loop_over_copied_objects_linear, 36 + 3 ⋅ b->_mObjects->elements.length.ub + 3 ⋅ (b->_mObjects->elements.length.ub + 1), OnUIThread:false, [{b->_mObjects->elements.length.ub + 1},Loop,{b->_mObjects->elements.length.ub},Loop]
codetoanalyze/objc/performance/copy_test_object.m, MyObj.copyWithZone:, 22, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test_object.m, MyObj.dealloc, 4, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test_object.m, MyObj.mObjects, 4, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test_object.m, MyObj.objects, 7, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test_object.m, MyObj.setMObjects:, 4, OnUIThread:false, []
codetoanalyze/objc/performance/copy_test_object.m, loop_over_copied_myobj_linear, 36 + 3 ⋅ b->_mObjects->elements.length.ub + 3 ⋅ (b->_mObjects->elements.length.ub + 1), OnUIThread:false, [{b->_mObjects->elements.length.ub + 1},Loop,{b->_mObjects->elements.length.ub},Loop]
[clang] fix bad interaction between ConditionalOperator and initializers Summary: This is several inter-connected changes together to keep the tests happy. The ConditionalOperator `b?t:e` is translated by first creating a placeholder variable to temporarily store the result of the evaluation in each branch, then the real thing we want to assign to reads that variable. But, there are situations where that changes the semantics of the expression, namely when the value created is a struct on the stack (eg, a C++ temporary). This is because in SIL we cannot assign the *address* of a program variable, only its contents, so by the time we're out of the conditional operator we cannot set the struct value correctly anymore: we can only set its content, which we did, but that results in a "shifted" struct value that is one dereference away from where it should be. So a batch of changes concern `conditionalOperator_trans`: - instead of systematically creating a temporary for the conditional, use the `trans_state.var_exp_typ` provided from above if available when translating `ConditionalOperator` - don't even set anything if that variable was already initialized by merely translating the branch expression, eg when it's a constructor - fix long-standing TODO to propagate these initialization facts accurately for ConditionalOperator (used by `init_expr_trans` to also figure out if it should insert a store to the variable being initialised or not) The rest of the changes adapt some relevant other constructs to deal with conditionalOperator properly now that it can set the current variable itself, instead of storing stuff inside a temp variable. This change was a problem because some constructs, eg a variable declaration, will insert nodes that set up the variable before calling its initialization, and now the initialization happens *before* that setup, in the translation of the inner conditional operator, which naturally creates nodes above the current one. - add a generic helper to force a sequential order between two translation results, forcing node creation if necessary - use that in `init_expr_trans` and `cxxNewExpr_trans` - adjust many places where `var_exp_typ` was incorrectly not reset when translating sub-expressions The sequentiality business creates more nodes when used, and the conditionalOperator business uses fewer temporary variables, so the frontend results change quite a bit. Note that biabduction tests were invaluable in debugging this. There could be other constructs to adjust similarly to cxxNewExpr that were not covered by the tests though. Added tests in pulse that exercises the previous bug. Reviewed By: da319 Differential Revision: D24796282 fbshipit-source-id: 0790c8d17
4 years ago
codetoanalyze/objc/performance/cost_test.m, always, 7, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, call_infinite, , OnUIThread:false, [Call to infinite,Unbounded loop,Loop]
codetoanalyze/objc/performance/cost_test.m, call_while_upto20_10_constant, 56, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, call_while_upto20_minus100_constant, 606, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, call_while_upto20_unsigned, 6 + 4 ⋅ (-x + 20) + (21-min(20, x)), OnUIThread:false, [{21-min(20, x)},Call to while_upto20,Loop,{-x + 20},Call to while_upto20,Loop]
codetoanalyze/objc/performance/cost_test.m, cond_constant, 14, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, div_const, 3, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, foo_constant, 6, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, infinite, , OnUIThread:false, [Unbounded loop,Loop]
[clang] fix bad interaction between ConditionalOperator and initializers Summary: This is several inter-connected changes together to keep the tests happy. The ConditionalOperator `b?t:e` is translated by first creating a placeholder variable to temporarily store the result of the evaluation in each branch, then the real thing we want to assign to reads that variable. But, there are situations where that changes the semantics of the expression, namely when the value created is a struct on the stack (eg, a C++ temporary). This is because in SIL we cannot assign the *address* of a program variable, only its contents, so by the time we're out of the conditional operator we cannot set the struct value correctly anymore: we can only set its content, which we did, but that results in a "shifted" struct value that is one dereference away from where it should be. So a batch of changes concern `conditionalOperator_trans`: - instead of systematically creating a temporary for the conditional, use the `trans_state.var_exp_typ` provided from above if available when translating `ConditionalOperator` - don't even set anything if that variable was already initialized by merely translating the branch expression, eg when it's a constructor - fix long-standing TODO to propagate these initialization facts accurately for ConditionalOperator (used by `init_expr_trans` to also figure out if it should insert a store to the variable being initialised or not) The rest of the changes adapt some relevant other constructs to deal with conditionalOperator properly now that it can set the current variable itself, instead of storing stuff inside a temp variable. This change was a problem because some constructs, eg a variable declaration, will insert nodes that set up the variable before calling its initialization, and now the initialization happens *before* that setup, in the translation of the inner conditional operator, which naturally creates nodes above the current one. - add a generic helper to force a sequential order between two translation results, forcing node creation if necessary - use that in `init_expr_trans` and `cxxNewExpr_trans` - adjust many places where `var_exp_typ` was incorrectly not reset when translating sub-expressions The sequentiality business creates more nodes when used, and the conditionalOperator business uses fewer temporary variables, so the frontend results change quite a bit. Note that biabduction tests were invaluable in debugging this. There could be other constructs to adjust similarly to cxxNewExpr that were not covered by the tests though. Added tests in pulse that exercises the previous bug. Reviewed By: da319 Differential Revision: D24796282 fbshipit-source-id: 0790c8d17
4 years ago
codetoanalyze/objc/performance/cost_test.m, infinite_FN, 17, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, iter_div_const_constant, 109, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, loop0_constant, 1005, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, loop3_constant, 97, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, loop_character_symbols_linear, 5 + 4 ⋅ (122-min(97, c)), OnUIThread:false, [{122-min(97, c)},Loop]
codetoanalyze/objc/performance/cost_test.m, unit_cost_function, 1, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test.m, while_upto20, 4 + 4 ⋅ (-m + 20) + (21-min(20, m)), OnUIThread:false, [{21-min(20, m)},Loop,{-m + 20},Loop]
codetoanalyze/objc/performance/cost_test_deps.m, if_bad_constant, 75, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, if_bad_loop_constant, 203, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, loop_despite_inferbo_constant, 1208, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, nested_loop_constant, 2547, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, real_while_constant, 218, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, simulated_nested_loop_cond_in_goto_constant, 3534, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, simulated_nested_loop_constant, 2529, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, simulated_nested_loop_more_expensive_constant, 2534, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, simulated_while_constant, 218, OnUIThread:false, []
codetoanalyze/objc/performance/cost_test_deps.m, two_loops, 549, OnUIThread:false, []
codetoanalyze/objc/performance/exit.m, call_exit_unreachable, ⊥, OnUIThread:false, [Unreachable node]
codetoanalyze/objc/performance/exit.m, call_unreachable_constant, 2, OnUIThread:false, []
codetoanalyze/objc/performance/exit.m, compute_exit_unreachable, ⊥, OnUIThread:false, [Unreachable node]
codetoanalyze/objc/performance/exit.m, exit_unreachable, ⊥, OnUIThread:false, [Unreachable node]
codetoanalyze/objc/performance/exit.m, inline_exit_unreachable_FP, 3 ⋅ p + 2 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},Loop,{p},Loop]
codetoanalyze/objc/performance/exit.m, linear, 3 + 3 ⋅ p + 2 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},Loop,{p},Loop]
codetoanalyze/objc/performance/field_access.m, Person.add_income_constant:, 12, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Person.bank_account, 4, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Person.dealloc, 4, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Person.init_with_name_constant:, 22, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Person.name, 4, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Person.setBank_account:, 4, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Person.setName:, 4, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Person.species_name_constant, 7, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Test1.dealloc, 1, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Test1.setX:, 4, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, Test1.x, 4, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, create_common_person_constant, 57, OnUIThread:false, []
codetoanalyze/objc/performance/field_access.m, iterate_upto_field_size_linear, 3 + 3 ⋅ test->_x.ub + 6 ⋅ (1+max(0, test->_x.ub)), OnUIThread:false, [{1+max(0, test->_x.ub)},Loop,{test->_x.ub},Loop]
codetoanalyze/objc/performance/instantiate.m, do_2_times_constant, 20, OnUIThread:false, []
codetoanalyze/objc/performance/instantiate.m, do_half_m2_times_quadratic, 3 + 5 ⋅ (m - 1) × m + 7 ⋅ m + 2 ⋅ m × (max(1, m)) + 2 ⋅ (1+max(0, m)), OnUIThread:false, [{1+max(0, m)},Loop,{max(1, m)},Call to do_n_times,Loop,{m},Loop,{m},Loop,{m - 1},Call to do_n_times,Loop]
codetoanalyze/objc/performance/instantiate.m, do_m2_times_quadratic, 3 + 7 ⋅ m + 5 ⋅ m × m + 2 ⋅ m × (1+max(0, m)) + 2 ⋅ (1+max(0, m)), OnUIThread:false, [{1+max(0, m)},Loop,{1+max(0, m)},Call to do_n_times,Loop,{m},Call to do_n_times,Loop,{m},Loop]
codetoanalyze/objc/performance/instantiate.m, do_n_times, 3 + 5 ⋅ n + 2 ⋅ (1+max(0, n)), OnUIThread:false, [{1+max(0, n)},Loop,{n},Loop]
codetoanalyze/objc/performance/instantiate.m, no_op, 2, OnUIThread:false, []
codetoanalyze/objc/performance/invariant.m, do_n_m_times_nested, 7 + 5 ⋅ n + 3 ⋅ n × m + 2 ⋅ n × (1+max(0, m)) + 2 ⋅ (1+max(0, n)), OnUIThread:false, [{1+max(0, n)},Loop,{1+max(0, m)},Loop,{m},Loop,{n},Loop]
codetoanalyze/objc/performance/invariant.m, two_loops_nested_invariant, 6 + 23 ⋅ p + 2 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},Loop,{p},Loop]
codetoanalyze/objc/performance/invariant.m, while_infinite_FN, 2, OnUIThread:false, []
codetoanalyze/objc/performance/invariant.m, while_unique_def_FN, 15, OnUIThread:false, []
codetoanalyze/objc/performance/jump_inside_loop.m, jump_inside_loop_constant_linear, 9 + (k - 1) + 4 ⋅ (max(1, k)), OnUIThread:false, [{max(1, k)},Loop,{k - 1},Loop]
codetoanalyze/objc/performance/jump_inside_loop.m, loop_always_linear, 7 + k + 2 ⋅ (max(1, k)) + 2 ⋅ (1+max(1, k)), OnUIThread:false, [{1+max(1, k)},Loop,{max(1, k)},Loop,{k},Loop]
codetoanalyze/objc/performance/loops.m, __infer_globals_initializer_array1, 4, OnUIThread:false, []
codetoanalyze/objc/performance/loops.m, __infer_globals_initializer_array2, 2, OnUIThread:false, []
codetoanalyze/objc/performance/loops.m, do_while_independent_of_p, 228, OnUIThread:false, []
codetoanalyze/objc/performance/loops.m, if_in_loop, 324, OnUIThread:false, []
codetoanalyze/objc/performance/loops.m, if_out_loop, 515, OnUIThread:false, []
codetoanalyze/objc/performance/loops.m, larger_state_FN, 1005, OnUIThread:false, []
codetoanalyze/objc/performance/loops.m, loop_use_global_vars, 4 + 4 ⋅ x + 2 ⋅ (1+max(0, x)), OnUIThread:false, [{1+max(0, x)},Loop,{x},Loop]
codetoanalyze/objc/performance/loops.m, ptr_cmp, 5 + 5 ⋅ size + 2 ⋅ (2+max(-1, size)), OnUIThread:false, [{2+max(-1, size)},Loop,{size},Loop]
codetoanalyze/objc/performance/mutable_copy_test.m, MyMutableObj.dealloc, 4, OnUIThread:false, []
codetoanalyze/objc/performance/mutable_copy_test.m, MyMutableObj.mObjects, 4, OnUIThread:false, []
codetoanalyze/objc/performance/mutable_copy_test.m, MyMutableObj.mutableCopyWithZone:, 22, OnUIThread:false, []
codetoanalyze/objc/performance/mutable_copy_test.m, MyMutableObj.objects, 7, OnUIThread:false, []
codetoanalyze/objc/performance/mutable_copy_test.m, MyMutableObj.setMObjects:, 4, OnUIThread:false, []
codetoanalyze/objc/performance/mutable_copy_test.m, loop_over_mutable_copy_linear, 36 + 3 ⋅ b->_mObjects->elements.length.ub + 3 ⋅ (b->_mObjects->elements.length.ub + 1), OnUIThread:false, [{b->_mObjects->elements.length.ub + 1},Loop,{b->_mObjects->elements.length.ub},Loop]
codetoanalyze/objc/performance/purity.m, loop, 6007 + 1000 ⋅ |fun_ptr|, OnUIThread:false, []
codetoanalyze/objc/performance/switch_continue.m, test_switch_FN, 601, OnUIThread:false, []
codetoanalyze/objc/performance/switch_continue.m, unroll_loop, 16 + (n - 1) + 11 ⋅ (max(1, n)), OnUIThread:false, [{max(1, n)},Loop,{n - 1},Loop]
codetoanalyze/objc/performance/two_loops_symbolic.m, nop, 2, OnUIThread:false, []
codetoanalyze/objc/performance/two_loops_symbolic.m, two_loops_symb_diff, 8 + 5 ⋅ k + 5 ⋅ m + 2 ⋅ (1+max(0, k)) + 2 ⋅ (1+max(0, m)), OnUIThread:false, [{1+max(0, m)},Loop,{1+max(0, k)},Loop,{m},Loop,{k},Loop]
codetoanalyze/objc/performance/unreachable.m, always_ret_false, 2, OnUIThread:false, []
codetoanalyze/objc/performance/unreachable.m, linear_loop, 3 + 3 ⋅ x + 2 ⋅ (1+max(0, x)), OnUIThread:false, [{1+max(0, x)},Loop,{x},Loop]
codetoanalyze/objc/performance/unreachable.m, unreachable_branch_constant, 4, OnUIThread:false, []
codetoanalyze/objc/performance/unreachable.m, unreachable_branch_constant2, 4, OnUIThread:false, []
codetoanalyze/objc/performance/unreachable.m, unreachable_branch_linear_loop, 8 + 3 ⋅ x + 2 ⋅ (1+max(0, x)), OnUIThread:false, [{1+max(0, x)},Call to linear_loop,Loop,{x},Call to linear_loop,Loop]