lecture16-SSA
5
1 CS553 Lecture Static Single Assignment Form 3 Data Dependence Definition – Data dependences are constraints on the order i n which statements may be executed We say statement s 2 depends on s 1 – Flow (true) dependence : s 1 writes memory that s 2 later reads (RAW) – Anti-dependence: s 1 reads memory that s 2 later writes (WAR) – Output dependences : s 1 writes memory that s 2 later writes (WAW) – Input dependences : s 1 reads memory that s 2 later reads (RAR) True dependences – Flow dependences represent actual flow of data False dependences – Anti- and output dependences reflect reuse of memory , not actual data flow; can often be eliminated CS553 Lecture Static Single Assignment Form 4 Example s 1 a = b; s 2 b = c + d; s 3 e = a + d; s 4 b = 3; s 5 f = b * 2; flow anti output input CS553 Lecture Static Single Assignment Form 5 Representing Data Dependences Implicitly – Using va riabl e defs and uses – Pros: simpl e – Cons: hides data dependence (analyses must find this info) Def-use chains (du chains) – Link eac h def to its us es – Pros: expli cit; theref ore fast – Cons: must be computed and updated, space consuming Alternate representations – e.g., Static single assignment form (SSA), dependence flow graphs (DFG), value dependence graphs (VDG) CS553 Lecture Static Single Assignment Form 6 DU Chains Definition – du chains li nk each def to i ts uses Example s 1 a = b; s 2 b = c + d; s 3 e = a + d; s 4 b = 3; s 5 f = b * 2; du chain
Transcript of lecture16-SSA
![Page 1: lecture16-SSA](https://reader030.fdocuments.in/reader030/viewer/2022021215/577d354a1a28ab3a6b900a98/html5/thumbnails/1.jpg)
8/8/2019 lecture16-SSA
http://slidepdf.com/reader/full/lecture16-ssa 1/5
![Page 2: lecture16-SSA](https://reader030.fdocuments.in/reader030/viewer/2022021215/577d354a1a28ab3a6b900a98/html5/thumbnails/2.jpg)
8/8/2019 lecture16-SSA
http://slidepdf.com/reader/full/lecture16-ssa 2/5
![Page 3: lecture16-SSA](https://reader030.fdocuments.in/reader030/viewer/2022021215/577d354a1a28ab3a6b900a98/html5/thumbnails/3.jpg)
8/8/2019 lecture16-SSA
http://slidepdf.com/reader/full/lecture16-ssa 3/5
![Page 4: lecture16-SSA](https://reader030.fdocuments.in/reader030/viewer/2022021215/577d354a1a28ab3a6b900a98/html5/thumbnails/4.jpg)
8/8/2019 lecture16-SSA
http://slidepdf.com/reader/full/lecture16-ssa 4/5
![Page 5: lecture16-SSA](https://reader030.fdocuments.in/reader030/viewer/2022021215/577d354a1a28ab3a6b900a98/html5/thumbnails/5.jpg)
8/8/2019 lecture16-SSA
http://slidepdf.com/reader/full/lecture16-ssa 5/5