| 85 | }; |
| 86 | |
| 87 | void Track(const Node& n) { |
| 88 | for (auto& c : n.children) { |
| 89 | Track(c); |
| 90 | } |
| 91 | switch (n.etype) { |
| 92 | case ExprType::Load: { |
| 93 | auto& le = *cast<LoadExpr>(n.e); |
| 94 | LoadStore(le.offset, le.opcode, le.opcode.GetResultType(), le.align, |
| 95 | n.children[0]); |
| 96 | break; |
| 97 | } |
| 98 | case ExprType::Store: { |
| 99 | auto& se = *cast<StoreExpr>(n.e); |
| 100 | LoadStore(se.offset, se.opcode, se.opcode.GetParamType2(), se.align, |
| 101 | n.children[0]); |
| 102 | break; |
| 103 | } |
| 104 | default: |
| 105 | break; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | const std::string AddrExpName(const Node& addr_exp) const { |
| 110 | // TODO: expand this to more kinds of address expressions. |
no test coverage detected