Skip to content

Commit

Permalink
Enhance documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Nov 23, 2021
1 parent bd321b9 commit 81666f8
Show file tree
Hide file tree
Showing 30 changed files with 34 additions and 29 deletions.
5 changes: 5 additions & 0 deletions libyul/optimiser/UnusedStoreBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ struct Dialect;
/**
* Base class for both UnusedAssignEliminator and UnusedStoreEliminator.
*
* The class tracks the state of abstract "stores" (assignments or mstore/sstore
* statements) across the control-flow. It is the job of the derived class to create
* the stores and track references, but the base class adjusts their "used state" at
* control-flow splits and joins.
*
* Prerequisite: Disambiguator, ForLoopInitRewriter.
*/
class UnusedStoreBase: public ASTWalker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let a := 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
mstore(x, 0)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
mstore(x, 0x42)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
x := 3
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
mstore(x, 0x42)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
mstore(x, 0x42)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x := 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
x := 13
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x := 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// for { } 1 { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
mstore(x, 0x42)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x := 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
mstore(x, 0x42)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x := 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
x := 3
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
mstore(x, 0x42)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x := 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
r := 2
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let r
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
mstore(0, d)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
mstore(0, d)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
mstore(0, d)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// function f(a, b) -> x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
y := 4
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// function f() -> a, b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
a := b
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let a := 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
a := mload(0)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let i := 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let i := 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
a := 2
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// { let a }
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
mstore(x, 0)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
mstore(x, 0)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
mstore(x, 0)
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
case 0 { mstore(0, 1) }
}
// ----
// step: redundantAssignEliminator
// step: unusedAssignEliminator
//
// {
// let x
Expand Down

0 comments on commit 81666f8

Please sign in to comment.