Mercurial > lcfOS
comparison doc/compiler.rst @ 357:818be710e13d
Added acceptance function to burg
author | Windel Bouwman |
---|---|
date | Fri, 14 Mar 2014 15:14:29 +0100 |
parents | 38f5f298ce0e |
children | 39bf68bf1891 |
comparison
equal
deleted
inserted
replaced
356:52492b304adf | 357:818be710e13d |
---|---|
75 Back-end | 75 Back-end |
76 -------- | 76 -------- |
77 | 77 |
78 The back-end is more complicated. There are several steps to be taken here. | 78 The back-end is more complicated. There are several steps to be taken here. |
79 | 79 |
80 1. Instruction selection | 80 1. Canonicalization |
81 2. register allocation | 81 2. Tree creation |
82 3. Peep hole optimization? | 82 3. Instruction selection |
83 4. real code generation | 83 4. register allocation |
84 5. Instruction emission | |
85 6. TODO: Peep hole optimization? | |
84 | 86 |
85 .. automodule:: ppci.codegen | 87 .. automodule:: ppci.codegen |
86 :members: | 88 :members: |
89 | |
90 Canonicalize | |
91 ~~~~~~~~~~~~ | |
92 | |
93 During this phase, the IR-code is made simpler. Function calls are pulled pulled | |
94 to top level and the frame pointer is introduced. | |
95 | |
96 Tree building | |
97 ~~~~~~~~~~~~~ | |
98 | |
99 From IR-code a tree is generated which can be used to select instructions. | |
87 | 100 |
88 Instruction selection | 101 Instruction selection |
89 ~~~~~~~~~~~~~~~~~~~~~ | 102 ~~~~~~~~~~~~~~~~~~~~~ |
90 | 103 |
91 The instruction selection phase takes care of scheduling and instruction | 104 The instruction selection phase takes care of scheduling and instruction |
95 // .. autoclass:: ppci.irmach.Frame | 108 // .. autoclass:: ppci.irmach.Frame |
96 | 109 |
97 // .. autoclass:: ppci.irmach.AbstractInstruction | 110 // .. autoclass:: ppci.irmach.AbstractInstruction |
98 | 111 |
99 | 112 |
113 Register allocation | |
114 ~~~~~~~~~~~~~~~~~~~ | |
115 | |
116 The selected instructions are used to select correct registers. | |
117 | |
118 |