Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limited support for PHI node #2

Closed
tancheng opened this issue Jul 15, 2021 · 1 comment
Closed

Limited support for PHI node #2

tancheng opened this issue Jul 15, 2021 · 1 comment

Comments

@tancheng
Copy link
Owner

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). I might provide a new design of the PHI node in DFG 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++;
    }
  }
@tancheng
Copy link
Owner Author

Similar to the nested-loop, we now have a different way to handle ctrl flow. This problem should be fine for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant