We saw "tiles" for ADD, INCR, LOAD, and STORE instructions in lecture. For these tiles, we used one HERA instruction to "cover" one AST node (e.g. for ADD) or several AST nodes (for INCR). Spend up to 30 minutes on the following two questions. 1) Covering a tree with tiles Draw AST's for the following tiger expressions and tile them with the ADD tiles from lecture. Although your compilers in lab will not handle variables in this way, for this mini-homework you should assume that "x" is in register 9 and "y" in register 8. (x + y)+(y + x) x + y + y + x 2) Creating and using some new tiles It is possible to create a tile for which several assembly-language instructions together cover one or more AST nodes. For example, we covered the AST A_OpExp(A_ltOp, _left, _right) with the following operations (if the _left child used more registers): _left->instructions + _right->instructions + CMP(_left->result_register, _right->result_register) + BL(left_was_less_1) SET(this->result_register, 0) // False BR(done_with_less_1) LABEL(left_was_less_1) SET(this->result_register, 1) // True LABEL(done_with_less_1) This corresponds to covering one AST node with a collection of five HERA instructions (and two labels). a) Describe the code generation step we discussed for "if" as a tile. b) Create a tile that covers an "if" with a "<" condition using one single tile with as few HERA instructions as you can. c) Show _how_ code would be generated for each of the following expressions using the simple one-node-at-a-time approach I've recommended for lab, by maximal munch, and by the dynamic programming based instruction algorithm. For the last, show the instructions that are tentatively associated with each node as the algorithm runs. As in Question 1, assume "x" is in R9 and "y" in R8. if x then x else y if x < y then x else y This will be good practice for Lab 6 as well as the advanced algorithms.