Problem
Given a program, writing an LLVM pass to count the (floating-point) arguments of each function.
Benchmark
programs from SPEC 2000
- 177.mesa
- 179.art
- 183.equake
- 188.amp
Submission
- For each program, output a .txt file as the result, named as H1_progName_StuFstName_StuID, e.g., H1_mesa_Mahiro_013038.txt;
- Include all resulting files in a single directory named as H1_StuFstName_StuID, compress the directory and submit the package, e.g., H1_Mahiro_013038.tar.gz;
- In each .txt file, the counting result of a function occupies exactly one line
- format string:
“%s\t%d\t%d\n” % (func_name, arg_cnt, fp_arg_cnt);
- example:
- for function with the prototype:
int main(int argc, char **argv)
- the result:
main 2 0
Sample
Program
factorial.c
factorial.bc
factorial.ll
Output
H1_factorial_Mahiro_013038.txt