How do I parallelize a Fortran code with SUIF 1?

You can use the provided parallelization driver:
pscc -parallel program.f

This driver executes a series of passes to parallelize a code.

  1. SF2C
  2. : first pass of the SUIF Fortran 77 front end
  3. CPP
  4. : preprocess
  5. SNOOT
  6. : translate pre-processed C to SUIF
  7. FIXFORTRAN
  8. : final processing for the SUIF Fortran 77 front end
  9. ENTRY_TYPES
  10. : propagate parameter type info for Fortran entry points
  11. PORKY_PRE_DEFAULTS
    PORKY_DEFAULTS
  12. : This does the default options to be used right after the front end, to turn some non-standard SUIF that the front end produces into standard SUIF. It also does some things, like constant folding and removing empty symbol tables, to make the code as simple as possible without losing information. It is equivalent to all of the options:
  13. PORKY_LINE_FIX
  14. : This removes all mark instructions that contain nothing but line information that is followed immediately by another line information mark.
  15. LINKSUIF
  16. : combine SUIF files into a file set.
  17. PORKY_UCF_OPT
  18. : Do simple optimizations on unstructured control flow (branches and labels).
  19. PORKY_DEAD_CODE1
  20. : Simple dead-code elimination.
  21. STRUCTURE
  22. : structure control flow.
  23. PORKY_FOLD1
  24. : This folds constants wherever possible.
  25. PORKY_FIND_FORS
  26. : This builds tree_for nodes out of tree_loop nodes for which a suitable index variable and bounds can be found.
  27. PORKY_CONST1
  28. : Simple constant propagation.
  29. PORKY_FOLD2
  30. :
  31. PORKY_COPY_PROP
  32. : This does copy propagation, which is the same as forward propagation limited to expressions that are simple local variables (i.e. if there is a simple copy from one local variable into another, uses of the source variable will replace the destination variable where the copy is live).
  33. PORKY_DEAD_CODE2
  34. :
  35. PORKY_UNUSED1
  36. : This removes types and symbols that are never referenced and have no external linkage, or that have external linkage but are not defined in this file (i.e. no procedure body or var_def).
  37. PORKY_EMPTY_TABLE1
  38. : This dismantles all TREE_BLOCKs that have empty symbol tables.
  39. PORKY_EMPTY_FOR1
  40. : This dismantles TREE_FORs with empty bodies.
  41. PORKY_CONTROL_SIMP1
  42. : This simplifies TREE_IFs for which this pass can tell that one branch or the other always executes, leaving only the instructions from the branch that executes and any parts of the test section that might have side effects.
  43. PORKY_FORWARD_PROP1
  44. : move as much computation as possible into the bound expressions of each loop
  45. PORKY_FOLD3
  46. :
  47. PORKY_DEAD_CODE3
  48. :
  49. PORKY_LOOP_COND
  50. : Move all loop-invariant conditionals that are inside a TREE_LOOP or TREE_FOR outside the outermost loop.
  51. PORKY_FORWARD_PROP2
  52. :
  53. PORKY_FOLD4
  54. :
  55. PORKY_DEAD_CODE4
  56. :
  57. PORKY_UNUSED2
  58. :
  59. PORKY_EMPTY_TABLE2
  60. :
  61. PORKY_EMPTY_FOR2
  62. :
  63. PORKY_CONTROL_SIMP2
  64. :
  65. PORKY_LOOP_INVARIANTS1
  66. :This moves the calculation of loop-invariant expressions outside loop bodies.
  67. PORKY_FORWARD_PROP3
  68. :
  69. PORKY_CSE1
  70. : This does simple common sub-expression elimination.
  71. PORKY_CONST2
  72. : This does simple constant propagation.
  73. PORKY_SCALARIZE
  74. : This turns local array variables into collections of element variables when all uses of the array are loads or stores of known elements. It will partly scalarize multi-dimensional arrays if they can be scalarized in some but not all dimensions.
  75. PORKY_FORWARD_PROP4
  76. :
  77. PORKY_CONST3
  78. :
  79. NORMALIZE
  80. :
  81. PORKY_IVAR1
  82. : This does simple induction variable detection.
  83. PORKY_IVAR2
  84. :
  85. PORKY_IVAR3
  86. :
  87. PORKY_KNOW_BOUNDS
  88. : This replaces comparisons of upper and lower bounds of a loop inside the loop body with the known result of that comparison. This is particularly useful after multi-level induction variables have been replaced.
  89. PORKY_CONST4
  90. :
  91. PORKY_FOLD5
  92. :
  93. SCE0
  94. :
  95. REDUCTIONS
  96. :
  97. PORKY_EMPTY_FOR3
  98. :
  99. PREDEP
  100. :
  101. PORKY_DEAD_CODE5
  102. :
  103. SKWEEL
  104. :
  105. PORKY_UNCBR
  106. : Replace call-by-reference scalar variables with copy-in, copy-out. This is useful when a later pass, such as a back-end compiler after s2c will not have access to call-by-ref form.
  107. PGEN
  108. :
  109. PORKY_FOLD6
  110. :
  111. PORKY_FORWARD_PROP5
  112. :
  113. PORKY_DEAD_CODE6
  114. :
  115. PORKY_LOOP_INVARIANTS2
  116. :
  117. PORKY_FORWARD_PROP6
  118. :
  119. PORKY_CSE2
  120. :
  121. PORKY_DEAD_CODE7
  122. :
  123. CFORM
  124. : translate inside SUIF from Fortran to C form.
  125. PORKY_UNUSED3
  126. :
  127. S2C
  128. : convert a SUIF file to C
  129. BACKEND_CC
  130. : Use cc or gcc.
  131. LD
  132. : ld.

(See the man pages provided with the SUIF distribution for more. Much of this data was gathered from the man pages.)