+2019-05-24 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/90607
+ * tree-loop-distribution.c (struct partition): Add location
+ member.
+ (partition_alloc): Initialize all fields.
+ (generate_memset_builtin): Use the location recorded in the
+ partition for the generated call.
+ (generate_memcpy_builtin): Likewise.
+ (classify_partition): Record the location of a single store
+ as location for the partition.
+
2019-05-24 Andrew Stubbs <ams@codesourcery.com>
* config/gcn/gcn.c (gcn_expand_prologue): Use gen_addsi3_scalar_carry
bitmap stmts;
/* True if the partition defines variable which is used outside of loop. */
bool reduction_p;
+ location_t loc;
enum partition_kind kind;
enum partition_type type;
/* Data references in the partition. */
partition *partition = XCNEW (struct partition);
partition->stmts = BITMAP_ALLOC (NULL);
partition->reduction_p = false;
+ partition->loc = UNKNOWN_LOCATION;
partition->kind = PKIND_NORMAL;
+ partition->type = PTYPE_PARALLEL;
partition->datarefs = BITMAP_ALLOC (NULL);
return partition;
}
fn = build_fold_addr_expr (builtin_decl_implicit (BUILT_IN_MEMSET));
fn_call = gimple_build_call (fn, 3, mem, val, nb_bytes);
+ gimple_set_location (fn_call, partition->loc);
gsi_insert_after (&gsi, fn_call, GSI_CONTINUE_LINKING);
fold_stmt (&gsi);
false, GSI_CONTINUE_LINKING);
fn = build_fold_addr_expr (builtin_decl_implicit (kind));
fn_call = gimple_build_call (fn, 3, dest, src, nb_bytes);
+ gimple_set_location (fn_call, partition->loc);
gsi_insert_after (&gsi, fn_call, GSI_CONTINUE_LINKING);
fold_stmt (&gsi);
if (!find_single_drs (loop, rdg, partition, &single_st, &single_ld))
return;
+ partition->loc = gimple_location (DR_STMT (single_st));
+
/* Classify the builtin kind. */
if (single_ld == NULL)
classify_builtin_st (loop, partition, single_st);