Lines Matching refs:lhs

579       tree callee, lhs, fn, tem;  in get_string_length()  local
586 lhs = gimple_call_lhs (stmt); in get_string_length()
601 gcc_assert (lhs == NULL_TREE); in get_string_length()
611 lhs = make_ssa_name (TREE_TYPE (TREE_TYPE (fn)), lenstmt); in get_string_length()
612 gimple_call_set_lhs (lenstmt, lhs); in get_string_length()
616 if (!ptrofftype_p (TREE_TYPE (lhs))) in get_string_length()
618 lhs = convert_to_ptrofftype (lhs); in get_string_length()
619 lhs = force_gimple_operand_gsi (&gsi, lhs, true, NULL_TREE, in get_string_length()
624 POINTER_PLUS_EXPR,tem, lhs); in get_string_length()
627 lhs = NULL_TREE; in get_string_length()
640 gcc_assert (lhs == NULL_TREE); in get_string_length()
647 lhs = make_ssa_name (TREE_TYPE (TREE_TYPE (fn)), stmt); in get_string_length()
648 gimple_call_set_lhs (stmt, lhs); in get_string_length()
660 gcc_assert (lhs != NULL_TREE); in get_string_length()
662 set_endptr_and_length (loc, si, lhs); in get_string_length()
667 set_endptr_and_length (loc, chainsi, lhs); in get_string_length()
1164 maybe_set_strlen_range (tree lhs, tree src) in maybe_set_strlen_range() argument
1166 if (TREE_CODE (lhs) != SSA_NAME in maybe_set_strlen_range()
1167 || !INTEGRAL_TYPE_P (TREE_TYPE (lhs))) in maybe_set_strlen_range()
1197 set_range_info (lhs, VR_RANGE, min, max); in maybe_set_strlen_range()
1211 tree lhs = gimple_call_lhs (stmt); in handle_builtin_strlen() local
1213 if (lhs == NULL_TREE) in handle_builtin_strlen()
1224 rhs = build_int_cst (TREE_TYPE (lhs), ~idx); in handle_builtin_strlen()
1240 if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs))) in handle_builtin_strlen()
1242 TREE_TYPE (lhs), rhs); in handle_builtin_strlen()
1255 && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) in handle_builtin_strlen()
1258 si->nonzero_chars = lhs; in handle_builtin_strlen()
1265 strlen_to_stridx->put (lhs, stridx_strlenloc (idx, loc)); in handle_builtin_strlen()
1270 if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) in handle_builtin_strlen()
1285 si->nonzero_chars = lhs; in handle_builtin_strlen()
1290 old = fold_convert_loc (loc, TREE_TYPE (lhs), old); in handle_builtin_strlen()
1292 TREE_TYPE (lhs), lhs, old); in handle_builtin_strlen()
1307 strinfo *si = new_strinfo (src, idx, lhs, true); in handle_builtin_strlen()
1313 maybe_set_strlen_range (lhs, src); in handle_builtin_strlen()
1318 strlen_to_stridx->put (lhs, stridx_strlenloc (idx, loc)); in handle_builtin_strlen()
1333 tree lhs = gimple_call_lhs (stmt); in handle_builtin_strchr() local
1336 if (lhs == NULL_TREE) in handle_builtin_strchr()
1370 if (!useless_type_conversion_p (TREE_TYPE (lhs), in handle_builtin_strchr()
1372 rhs = fold_convert_loc (loc, TREE_TYPE (lhs), rhs); in handle_builtin_strchr()
1379 if (!useless_type_conversion_p (TREE_TYPE (lhs), in handle_builtin_strchr()
1381 rhs = fold_convert_loc (loc, TREE_TYPE (lhs), rhs); in handle_builtin_strchr()
1394 && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) in handle_builtin_strchr()
1397 si->endptr = lhs; in handle_builtin_strchr()
1399 zero_length_string (lhs, si); in handle_builtin_strchr()
1403 if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) in handle_builtin_strchr()
1411 zero_length_string (lhs, NULL); in handle_builtin_strchr()
1417 tree lhsu = fold_convert_loc (loc, size_type_node, lhs); in handle_builtin_strchr()
1422 si->endptr = lhs; in handle_builtin_strchr()
1425 zero_length_string (lhs, si); in handle_builtin_strchr()
1429 zero_length_string (lhs, NULL); in handle_builtin_strchr()
1441 tree src, dst, srclen, len, lhs, type, fn, oldlen; in handle_builtin_strcpy() local
1450 lhs = gimple_call_lhs (stmt); in handle_builtin_strcpy()
1481 if (lhs != NULL_TREE || !builtin_decl_implicit_p (BUILT_IN_STPCPY)) in handle_builtin_strcpy()
1488 if (lhs == NULL_TREE) in handle_builtin_strcpy()
1492 tree lhsuint = fold_convert_loc (loc, size_type_node, lhs); in handle_builtin_strcpy()
1607 if (lhs) in handle_builtin_strcpy()
1608 ssa_ver_to_stridx[SSA_NAME_VERSION (lhs)] = didx; in handle_builtin_strcpy()
1613 if (lhs) in handle_builtin_strcpy()
1614 ssa_ver_to_stridx[SSA_NAME_VERSION (lhs)] = didx; in handle_builtin_strcpy()
1622 if (lhs) in handle_builtin_strcpy()
1624 dsi->endptr = lhs; in handle_builtin_strcpy()
1625 zsi = zero_length_string (lhs, dsi); in handle_builtin_strcpy()
1634 if (lhs) in handle_builtin_strcpy()
1636 dsi->endptr = lhs; in handle_builtin_strcpy()
1637 zsi = zero_length_string (lhs, dsi); in handle_builtin_strcpy()
1914 tree lhs = gimple_assign_lhs (next_stmt); in maybe_diag_stxncpy_trunc() local
1915 tree_code code = TREE_CODE (lhs); in maybe_diag_stxncpy_trunc()
1917 lhs = TREE_OPERAND (lhs, 0); in maybe_diag_stxncpy_trunc()
1923 if (ret && operand_equal_p (ret, lhs, 0)) in maybe_diag_stxncpy_trunc()
1936 tree lhsbase = get_addr_base_and_unit_offset (lhs, &lhsoff); in maybe_diag_stxncpy_trunc()
2201 tree src, dst, len, lhs, oldlen, newlen; in handle_builtin_memcpy() local
2337 lhs = gimple_call_lhs (stmt); in handle_builtin_memcpy()
2348 if (lhs) in handle_builtin_memcpy()
2349 ssa_ver_to_stridx[SSA_NAME_VERSION (lhs)] = didx; in handle_builtin_memcpy()
2387 tree lhs = gimple_call_lhs (stmt); in handle_builtin_strcat() local
2441 if (builtin_decl_implicit_p (BUILT_IN_STPCPY) && lhs == NULL_TREE) in handle_builtin_strcat()
2491 if (lhs == NULL_TREE && builtin_decl_implicit_p (BUILT_IN_STPCPY)) in handle_builtin_strcat()
2502 if (lhs) in handle_builtin_strcat()
2635 tree lhs = gimple_call_lhs (stmt); in handle_builtin_malloc() local
2636 if (lhs == NULL_TREE) in handle_builtin_malloc()
2639 gcc_assert (get_stridx (lhs) == 0); in handle_builtin_malloc()
2640 int idx = new_stridx (lhs); in handle_builtin_malloc()
2644 strinfo *si = new_strinfo (lhs, idx, length, length != NULL_TREE); in handle_builtin_malloc()
2646 si->endptr = lhs; in handle_builtin_malloc()
2692 tree lhs = gimple_call_lhs (stmt2); in handle_builtin_memset() local
2694 if (lhs) in handle_builtin_memset()
2696 gimple *assign = gimple_build_assign (lhs, ptr); in handle_builtin_memset()
2801 tree lhs = gimple_assign_lhs (stmt), off; in handle_pointer_plus() local
2813 ssa_ver_to_stridx[SSA_NAME_VERSION (lhs)] in handle_pointer_plus()
2825 zsi = zero_length_string (lhs, si); in handle_pointer_plus()
2833 zsi = zero_length_string (lhs, si); in handle_pointer_plus()
2837 && si->endptr != lhs in handle_pointer_plus()
2841 = useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (si->endptr)) in handle_pointer_plus()
2897 tree ssaname = NULL_TREE, lhs = gimple_assign_lhs (stmt); in handle_char_store() local
2901 if (TREE_CODE (lhs) == MEM_REF in handle_char_store()
2902 && TREE_CODE (TREE_OPERAND (lhs, 0)) == SSA_NAME) in handle_char_store()
2904 tree mem_offset = TREE_OPERAND (lhs, 1); in handle_char_store()
2911 idx = get_stridx (TREE_OPERAND (lhs, 0)); in handle_char_store()
2915 ssaname = TREE_OPERAND (lhs, 0); in handle_char_store()
2922 idx = get_addr_stridx (lhs, NULL_TREE, &offset); in handle_char_store()
3030 idx = new_addr_stridx (lhs); in handle_char_store()
3033 tree ptr = (ssaname ? ssaname : build_fold_addr_expr (lhs)); in handle_char_store()
3048 && TREE_CODE (TREE_TYPE (lhs)) == ARRAY_TYPE) in handle_char_store()
3050 HOST_WIDE_INT a = int_size_in_bytes (TREE_TYPE (lhs)); in handle_char_store()
3053 int idx = new_addr_stridx (lhs); in handle_char_store()
3056 si = new_strinfo (build_fold_addr_expr (lhs), idx, in handle_char_store()
3250 tree lhs = gimple_assign_lhs (stmt); in strlen_check_and_optimize_stmt() local
3252 if (TREE_CODE (lhs) == SSA_NAME && POINTER_TYPE_P (TREE_TYPE (lhs))) in strlen_check_and_optimize_stmt()
3259 ssa_ver_to_stridx[SSA_NAME_VERSION (lhs)] = idx; in strlen_check_and_optimize_stmt()
3264 else if (TREE_CODE (lhs) == SSA_NAME && INTEGRAL_TYPE_P (TREE_TYPE (lhs))) in strlen_check_and_optimize_stmt()
3280 && TREE_CODE (TREE_TYPE (lhs)) == INTEGER_TYPE in strlen_check_and_optimize_stmt()
3281 && TYPE_MODE (TREE_TYPE (lhs)) == TYPE_MODE (char_type_node) in strlen_check_and_optimize_stmt()
3282 && (TYPE_PRECISION (TREE_TYPE (lhs)) in strlen_check_and_optimize_stmt()
3329 tree zero = build_int_cst (TREE_TYPE (lhs), 0); in strlen_check_and_optimize_stmt()
3350 tree type = TREE_TYPE (lhs); in strlen_check_and_optimize_stmt()
3352 = get_range_info (lhs, &min, &max); in strlen_check_and_optimize_stmt()
3359 set_range_info (lhs, VR_ANTI_RANGE, in strlen_check_and_optimize_stmt()
3371 strlen_to_stridx->put (lhs, stridx_strlenloc (*ps)); in strlen_check_and_optimize_stmt()
3374 else if (TREE_CODE (lhs) != SSA_NAME && !TREE_SIDE_EFFECTS (lhs)) in strlen_check_and_optimize_stmt()
3376 tree type = TREE_TYPE (lhs); in strlen_check_and_optimize_stmt()