presentation of tc-8tiger/lecture-notes/slides/tc/tc-8.pdf · yaka presentation of tc-8 2 / 14....
TRANSCRIPT
![Page 1: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/1.jpg)
Presentation of TC-8
Assistants 2009
May 6, 2014
![Page 2: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/2.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Presentation of TC-8
1 Overview of the tarball
2 Graph
3 Flowgraph
4 Liveness
5 Interference
6 Testing
YAKA Presentation of TC-8 2 / 14
![Page 3: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/3.jpg)
Overview of the tarball
1 Overview of the tarball
2 Graph
3 Flowgraph
4 Liveness
5 Interference
6 Testing
![Page 4: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/4.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
The tree structure of TC-8
New directory:
‘src/liveness’: Where you will work. Graphs describing theflow of control, the liveness and the interferences.
New files:
‘lib/misc/graph*’: Generic implementation of graph.
YAKA Presentation of TC-8 4 / 14
![Page 5: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/5.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
The tree structure of TC-8
New directory:
‘src/liveness’: Where you will work. Graphs describing theflow of control, the liveness and the interferences.
New files:
‘lib/misc/graph*’: Generic implementation of graph.
YAKA Presentation of TC-8 4 / 14
![Page 6: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/6.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
The tree structure of TC-8
New directory:
‘src/liveness’: Where you will work. Graphs describing theflow of control, the liveness and the interferences.
New files:
‘lib/misc/graph*’: Generic implementation of graph.
YAKA Presentation of TC-8 4 / 14
![Page 7: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/7.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
The tree structure of TC-8
New directory:
‘src/liveness’: Where you will work. Graphs describing theflow of control, the liveness and the interferences.
New files:
‘lib/misc/graph*’: Generic implementation of graph.
YAKA Presentation of TC-8 4 / 14
![Page 8: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/8.jpg)
Graph
1 Overview of the tarball
2 Graph
3 Flowgraph
4 Liveness
5 Interference
6 Testing
![Page 9: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/9.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Graph
Rely on boost.
Implemented as an adjacency graph.
Take a look at methods and free functions for the classadjacency list.
YAKA Presentation of TC-8 6 / 14
![Page 10: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/10.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Graph
Rely on boost.
Implemented as an adjacency graph.
Take a look at methods and free functions for the classadjacency list.
YAKA Presentation of TC-8 6 / 14
![Page 11: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/11.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Graph
Rely on boost.
Implemented as an adjacency graph.
Take a look at methods and free functions for the classadjacency list.
YAKA Presentation of TC-8 6 / 14
![Page 12: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/12.jpg)
Flowgraph
1 Overview of the tarball
2 Graph
3 Flowgraph
4 Liveness
5 Interference
6 Testing
![Page 13: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/13.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Flowgraph
Nodes of the graph are instructions.
If an instruction a can be followed by another b, then an edgeis created between a and b.
The flowgraph is an input for the creation of the livenessgraph.
YAKA Presentation of TC-8 8 / 14
![Page 14: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/14.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Flowgraph
Nodes of the graph are instructions.
If an instruction a can be followed by another b, then an edgeis created between a and b.
The flowgraph is an input for the creation of the livenessgraph.
YAKA Presentation of TC-8 8 / 14
![Page 15: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/15.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Flowgraph
Nodes of the graph are instructions.
If an instruction a can be followed by another b, then an edgeis created between a and b.
The flowgraph is an input for the creation of the livenessgraph.
YAKA Presentation of TC-8 8 / 14
![Page 16: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/16.jpg)
Liveness
1 Overview of the tarball
2 Graph
3 Flowgraph
4 Liveness
5 Interference
6 Testing
![Page 17: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/17.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Liveness
Answer to the question: who is alive just before theinstruction, and who just afterwards?
Rely on an iterative algorithm with a fixed point (even theleast fixed point!).
YAKA Presentation of TC-8 10 / 14
![Page 18: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/18.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Liveness
Answer to the question: who is alive just before theinstruction, and who just afterwards?
Rely on an iterative algorithm with a fixed point (even theleast fixed point!).
YAKA Presentation of TC-8 10 / 14
![Page 19: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/19.jpg)
Interference
1 Overview of the tarball
2 Graph
3 Flowgraph
4 Liveness
5 Interference
6 Testing
![Page 20: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/20.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Interference
Nodes of the graph are temporaries.
If temporary a is alive at the same time than b, then theyinterfere, and an edge is created.
The Interference graph is used for the register allocation.
What about MOVE?
If one move a in b, an interference edge should be created.But, in fact we want a and b to be in the same register.No edge, but remember it was a MOVE!
YAKA Presentation of TC-8 12 / 14
![Page 21: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/21.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Interference
Nodes of the graph are temporaries.
If temporary a is alive at the same time than b, then theyinterfere, and an edge is created.
The Interference graph is used for the register allocation.
What about MOVE?
If one move a in b, an interference edge should be created.But, in fact we want a and b to be in the same register.No edge, but remember it was a MOVE!
YAKA Presentation of TC-8 12 / 14
![Page 22: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/22.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Interference
Nodes of the graph are temporaries.
If temporary a is alive at the same time than b, then theyinterfere, and an edge is created.
The Interference graph is used for the register allocation.
What about MOVE?
If one move a in b, an interference edge should be created.But, in fact we want a and b to be in the same register.No edge, but remember it was a MOVE!
YAKA Presentation of TC-8 12 / 14
![Page 23: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/23.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Interference
Nodes of the graph are temporaries.
If temporary a is alive at the same time than b, then theyinterfere, and an edge is created.
The Interference graph is used for the register allocation.
What about MOVE?
If one move a in b, an interference edge should be created.But, in fact we want a and b to be in the same register.No edge, but remember it was a MOVE!
YAKA Presentation of TC-8 12 / 14
![Page 24: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/24.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Interference
Nodes of the graph are temporaries.
If temporary a is alive at the same time than b, then theyinterfere, and an edge is created.
The Interference graph is used for the register allocation.
What about MOVE?
If one move a in b, an interference edge should be created.But, in fact we want a and b to be in the same register.No edge, but remember it was a MOVE!
YAKA Presentation of TC-8 12 / 14
![Page 25: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/25.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Interference
Nodes of the graph are temporaries.
If temporary a is alive at the same time than b, then theyinterfere, and an edge is created.
The Interference graph is used for the register allocation.
What about MOVE?
If one move a in b, an interference edge should be created.But, in fact we want a and b to be in the same register.No edge, but remember it was a MOVE!
YAKA Presentation of TC-8 12 / 14
![Page 26: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/26.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Quick overview of Interference
Nodes of the graph are temporaries.
If temporary a is alive at the same time than b, then theyinterfere, and an edge is created.
The Interference graph is used for the register allocation.
What about MOVE?
If one move a in b, an interference edge should be created.But, in fact we want a and b to be in the same register.No edge, but remember it was a MOVE!
YAKA Presentation of TC-8 12 / 14
![Page 27: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/27.jpg)
Testing
1 Overview of the tarball
2 Graph
3 Flowgraph
4 Liveness
5 Interference
6 Testing
![Page 28: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/28.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Testing TC-8
No automated way to do it!
A few unit tests, but principally:
By looking at the generated graphs with dotty.
YAKA Presentation of TC-8 14 / 14
![Page 29: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/29.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Testing TC-8
No automated way to do it!
A few unit tests, but principally:
By looking at the generated graphs with dotty.
YAKA Presentation of TC-8 14 / 14
![Page 30: Presentation of TC-8tiger/lecture-notes/slides/tc/tc-8.pdf · YAKA Presentation of TC-8 2 / 14. Overview of the tarball 1 Overview of the tarball 2 Graph 3 Flowgraph 4 Liveness 5](https://reader033.vdocuments.us/reader033/viewer/2022060213/5f053d137e708231d411f856/html5/thumbnails/30.jpg)
Overview of the tarballGraph
FlowgraphLiveness
InterferenceTesting
Testing TC-8
No automated way to do it!
A few unit tests, but principally:
By looking at the generated graphs with dotty.
YAKA Presentation of TC-8 14 / 14