diff options
| author | Cliff Click <cliffc@acm.org> | 2026-10-02 14:27:49 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-10-02 14:27:49 -0700 |
| commit | 1e2ebb397cbbca1a7d2fd35052c3b90a47bb5733 (patch) | |
| tree | 536ac9c6e7e436f4fabf2944f2ce3abdfff54f4d /chapter04/appendix | |
| parent | e4dc3273f201ae741637b626998637cce973546b (diff) | |
| download | Simple-1e2ebb397cbbca1a7d2fd35052c3b90a47bb5733.tar.gz Simple-1e2ebb397cbbca1a7d2fd35052c3b90a47bb5733.zip | |
README updates thru ch10a
Diffstat (limited to 'chapter04/appendix')
| -rw-r--r-- | chapter04/appendix/dce.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chapter04/appendix/dce.md b/chapter04/appendix/dce.md index ad5be2d0..1f9dfa7a 100644 --- a/chapter04/appendix/dce.md +++ b/chapter04/appendix/dce.md @@ -4,12 +4,13 @@ Dead Code Elimination is the process or removing nodes that are dead(unused). There are two kinds of dead code eliminations present in this chapter. - Delete unused nodes when popping the scope. -- Delete old nodes after finding a better replacement(after idealize call). +- Delete old nodes after finding a better replacement (after calling `idealize()`). -Both of the methods mentioned above delete the nodes recursively. However, the first case happens -regardless of whether `peephole` is called or not. +Both of the methods mentioned above delete the nodes recursively. However, the +first case happens regardless of whether `peephole` is called or not. ### Delete unused nodes when popping the scope + A node is unused if it has no outputs(users). ### Example 1: @@ -109,11 +110,10 @@ return 1; - We move onto`a = 12`, since "a" has only one user left(the scope) and `this = scope` it can get killed easily. - Same as before, we go through the inputs of "a" and will delete them from the outputs of the control node. -*A constant node pointing to "Start"(ignored by the graph visualizer) but still maintains a connection:* -  ## Delete old nodes after finding a better replacement + Consider the following code: ``` return (2+1)+3; |
