tancheng / CGRA-Flow

CGRA-Flow is an integrated framework for CGRA compilation, exploration, synthesis, and development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limited support for PHI node

tancheng opened this issue · comments

Currently, we can only support PHI nodes that are accompanied by CMP nodes (i.e., a problem caused by the implementation of phi node in the functional unit architecture). We might provide a new design of the PHI node in both the DFG and RTL in the future.
For now, it is better to manually change the following code:

  for(int x=0; x<total; ++x) {
    int i = x / maxNodeCount;
    int j = x % maxNodeCount;
    if(matrix[i][j] != 0) {
      value[index] = matrix[i][j];
      row[index] = i;
      col[index] = j;
      index++;
    }
  }

to:

  for(int x=0; x<total; ++x) {
    int i = x / maxNodeCount;
    int j = x % maxNodeCount;
    value[index] = matrix[i][j];
    row[index] = i;
    col[index] = j;
    if(matrix[i][j] != 0) {
      index++;
    }
  }