Homework 1
- Due Aug 25, 2016 by 1:50pm
- Points 12
- Submitting a text entry box
1.
On any machine of your choice, checkout the latest LLVM, Clang, and Compiler-RT sources from subversion following the directions here:
http://clang.llvm.org/get_started.html Links to an external site.
Configure for a Release build. Build LLVM and Clang.
HANDIN: the output of "clang -v" for the version of clang you built
2.
Checkout the latest GCC sources from subversion. Configure and build GCC. Follow the instructions here:
https://gcc.gnu.org/install/index.html Links to an external site.
HANDIN: the output of "gcc -v" for the version of gcc you built
3.
Using the GCC explorer:
http://gcc.godbolt.org/ Links to an external site.
Select x86-64 clang 3.8 as the compiler. Write a C or C++ function that, when compiled at -O2, isn't fully optimized. Describe (in a comment below the source code) the missed optimization and also provide the fully optimized assembly code that the compiler should have generated.
HANDIN: a shortlink into GCC explorer so I can look at your code, explanation, and optimal assembly
4.
repeat #3, but with GCC 6.1 as the compiler. Make sure the C or C++ function is different from the one you hand in for #3