blob: 3206161ab422c1fc4f17ef232ee4cadd56b0a32d [file] [log] [blame]
Guochun Shie95b8272003-06-10 20:03:39 +00001The modulo scheduling pass impliment modulo scheduling for llvm instruction. It includes two passes
Guochun Shi0b970da2003-06-10 20:02:16 +00002
3
41. building graph
5The pass will build an instance of class ModuloSchedGraph for each loop-including basicblock in a function. The steps to build a graph:
6 a)build one node for each instruction in the basicblock
7 ---ModuloScheduGraph::buildNodesforBB()
8 b)add def-use edges
9 ---ModuloScheduGraph::addDefUseEdges()
10 c)add cd edges
11 ---ModuloScheduGraph::addCDEdges()
12 d)add mem dependency edges
13 ---ModuloScheduGraph::addMemEdges()
14 e)compute resource restriction II and recurrenct II
15 ---ModuloScheduGraph::computeResII()
16 ---ModuloScheduGraph::computeRecII()
17 f)compute each node's property, including ASAP,ALAP, Mov, Depth and Height.
18 ---ModuloScheduGraph::computeNodeProperty
19 g)sort all nodes
20 ---ModuloScheduGraph::orderNodes()
21
22
232. compute schedule
24The second step is to compute a schule and replace the orginal basic block with three basicblocks: prelogue, kernelblock and epilog.
25
26 a)compute the schedule according the algorithm described in the paper
27 ---ModuloScheduling::computeSchedule()
28
29 b)replace the original basicblock.(to be done)
30 ---ModuloScheduling::constructPrologue();
31 ---ModuloScheduling::constructKernel();
32 ---ModuloScheduling::constructEpilogue();
33 These three functions are not working yet.