brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · bc00326 Raw
40 lines · c
1#ifndef ISL_SCHEDULER_CLUSTERING_H2#define ISL_SCHEDULER_CLUSTERING_H3 4#include "isl_scheduler.h"5 6/* Clustering information used by isl_schedule_node_compute_wcc_clustering.7 *8 * "n" is the number of SCCs in the original dependence graph9 * "scc" is an array of "n" elements, each representing an SCC10 * of the original dependence graph.  All entries in the same cluster11 * have the same number of schedule rows.12 * "scc_cluster" maps each SCC index to the cluster to which it belongs,13 * where each cluster is represented by the index of the first SCC14 * in the cluster.  Initially, each SCC belongs to a cluster containing15 * only that SCC.16 *17 * "scc_in_merge" is used by merge_clusters_along_edge to keep18 * track of which SCCs need to be merged.19 *20 * "cluster" contains the merged clusters of SCCs after the clustering21 * has completed.22 *23 * "scc_node" is a temporary data structure used inside copy_partial.24 * For each SCC, it keeps track of the number of nodes in the SCC25 * that have already been copied.26 */27struct isl_clustering {28	int n;29	struct isl_sched_graph *scc;30	struct isl_sched_graph *cluster;31	int *scc_cluster;32	int *scc_node;33	int *scc_in_merge;34};35 36__isl_give isl_schedule_node *isl_schedule_node_compute_wcc_clustering(37	__isl_take isl_schedule_node *node, struct isl_sched_graph *graph);38 39#endif40