Fix bug: Jello/2003-08-23-RegisterAllocatePhysReg.ll
[oota-llvm.git] / lib / CodeGen / ModuloScheduling / README
1 The modulo scheduling pass impliment modulo scheduling for llvm instruction. It includes two passes
2
3
4 1. building graph
5 The 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
23 2. compute schedule
24 The 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.