[LLVMdev] Disable optimization
baldrick at free.fr
Fri Nov 28 03:13:19 PST 2008
> It matters if the optimisations the students have to implement are the
> optimisations done implicitly by LLVM.
They are not really done by LLVM, because no optimizations are done on the
LLVM IR. They are done by llvm-gcc, a front-end to LLVM:
(1) gcc does constant folding all over the place (nothing can be done about
(2) the llvm-gcc to LLVM converter also does constant folding (this can
be turned off easily enough)
(3) it seems that unused code can also be eliminated during the conversion
to LLVM IR. Presumably the code is simply never converted to IR in the
first place. I'm not sure how this happens. Perhaps it is possible to
ensure that everything gets converted.
More information about the llvm-dev