daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest May 17th, 2018 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct RWTable{
  2.     int flag;               // 0: init; 1: read first
  3.     struct variable *var;
  4.     int read[RWTOTAL];
  5.     int write[RWTOTAL];
  6.     struct RWTable *next;
  7. };
  8.  
  9. struct dataDependTable{
  10.     int used;
  11.     int i;
  12.     int j;
  13. };
  14.  
  15. struct dataDependTable flow[RWTOTAL];
  16. struct dataDependTable output[RWTOTAL];
  17. struct dataDependTable anti[RWTOTAL];
  18.  
  19. // build read and write table
  20. struct RWTable *buildRWTable();
  21.  
  22. // look up RWTable: if existed return; else create a new one
  23. struct RWTable *lookupRWTable(struct RWTable *head, struct variable *var);
  24.  
  25. // look up free index in read array
  26. int lookupReadFreeIndex(struct RWTable *node);
  27.  
  28. // look up free index in write array
  29. int lookupWriteFreeIndex(struct RWTable *node);
  30.  
  31. // clean up read & write array
  32. struct RWTable *cleanupRWTable(struct RWTable *node);
  33.  
  34. // show read & write table
  35. void showRWTable(struct RWTable *head);
  36.  
  37. // get dependencies for statements
  38. void getDataDepend(struct RWTable *head);
  39.  
  40. // get available and update existed flow type dependend table
  41. struct dataDependTable *lookupFlowDataDependTable(int write, int read);
  42.  
  43. // get available output data dependend table
  44. struct dataDependTable *lookupOutputDataDependTable();
  45.  
  46. // get available anti data dependend table
  47. struct dataDependTable *lookupAntiDataDependTable();
  48.  
  49. // show data dependence table
  50. void showDataDependTable();
  51.  
  52. // transfer to sentence
  53. void transfer2sentence();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top