Download and build LLVM according to instructions in the book or lecture 13.
Produce textual LLVM bitcode for the following function and save it in a file a.ll:
int f(int a, int b)
{
int c;
if (a < b)
c = a * b;
else
c = a * b;
return c * a + c * a;
}
Copy the Hello-transformation (see Lecture 13) to create a new optimization called EDAN75.
The compulsory part of the LLVM project is to recognize and optimize a redundant expression (not ''the'' since
it is unspecified which term is evaluated first in C/C++) in the return-statement.
Enable your optimization and also the mem2reg optimization.
In your build directory, run with the command: