================================ Checklist for GIMPLE assignments ================================= The assignments have been designed with specific learning objectives. The following self-assessment list should give you a fair idea of the extent to which you have learnt the expected material. Please try to respond to these statements after doing the assignments on GIMPLE. Your responses to the statements could be: `Yes', `No', or `Partly', or `I am not sure'. Please make sure that you move to an assignment only after getting mostly `Yes' on the checklist for the previous assignment. This is advisable even if this seems to slow down your progress because in general, an assignment assumes the knowledge gained from the previous assignment. In case you are unable to say `Yes' for many of the statements, we advise you to talk to a Teaching Assistant to clarify the concepts. If the need be, we will try to find someone to explain the concepts later in the evening. Assignment 1 ------------ 1. I know how to add a pass a. I know how to instantiate a data structure for adding a pass. (use of `struct gimple_opt_pass', `struct simple_ipa_opt_pass' ) b. I know how to include the pass as a dynamic plugin by i. specifying the positioning of the pass in `struct register_pass_info' ii. activating the plugin in function `plugin_init' 2. I know the difference in the specification of an intraprocedural pass and interprocedural pass in terms of . a. Order of execution of intraprocedural passes over a set of functions. b. Order of execution of interprocedural passes over a set of functions. Assignment 2 ------------ 1. I can identify the following types of GIMPLE statements a. GIMPLE assignment statement b. GIMPLE call statement c. GIMPLE conditional statement 2. I can extract the right hand side of the assignment statement a. operands and its types (Pointer, constants, integer, etc) b. operators and its types (unary, binary) 3. I can access global variables in a file. 4. I can access local variables of a function. 5. I can access formal parameters of a functions. 6. I can iterate over basic blocks in a function. 7. I can iterate over statements in a basic block. Assignment 3 ------------ At the end of this assignment, you should know how to: 1. I can identify if the assignment statement contains a constant value. 2. I can extract the integer constant value. 3. I can construct a GIMPLE assignment statement. 4. I can replace a GIMPLE statement with another GIMPLE statement. Assignment 4 ------------ 1. I can iterate over all the functions in call graph. 2. I can identify the `main' function. 3. I can access the callers and callees of a function by iterating over cgraph structure. 4. I am able to print the name of a function. Assignment 5 ------------ 1. I know how to generate combined output for multiple input files. 2. I know how to load both callgraph and function bodies and how to load only callgraph in link time optimization.