13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using the C Compilercompiled.This is a natural result of global optimizations, where the code generated <strong>for</strong> multiple moduleswas affected by the change.In general, if you do not need code compaction, <strong>for</strong> example because you are optimizing fully <strong>for</strong> speed,it is recommended to choose Optimize less/Build faster.Optimization OptionsIn general any optimization may require more work to be done by the compiler. But this does not meanthat disabling all optimizations (level 0) gives the fastest compilation time. Disabling optimizations mayresult in more code being generated, resulting in more work <strong>for</strong> other parts of the compiler, like <strong>for</strong> examplethe register allocator.Automatic InliningAutomatic inlining is an optimization which can result in significant longer build time. The overall functionswill get bigger, often making it possible to do more optimizations. But also often resulting in more registersto be in use in a function, giving the register allocation a tougher job.Code CompactionWhen you disable the code compaction optimization, the build times may be shorter. Certainly when MILlinking is used where the full application is passed as a single MIL stream to the code generation. Codecompaction is however an optimization which can make a huge difference when optimizing <strong>for</strong> code size.When size matters it makes no sense to disable this option. When you choose to optimize <strong>for</strong> speed(--tradeoff=0) the code compaction is automatically disabled.Compiler CacheThe C compiler has support <strong>for</strong> caching intermediate results to avoid full compilations. When the sourcecode after preprocessing and relevant compiler options and the compiler version are the same as in aprevious invocation, the previous result is copied to the output file. The cache only works when there isa single C input file and a single output file (no --mil-split).To enable caching from Eclipse:1. From the Project menu, select Properties <strong>for</strong>The Properties dialog appears.2. In the left pane, expand C/C++ Build and select Settings.In the right pane the Settings appear.3. On the Tool Settings tab, select C/C++ Compiler » Optimization » Compilation Speed.4. Enable the option Cache generated code to improve the compilation speed.5. In the Directory <strong>for</strong> cached files field, enter the name <strong>for</strong> the location of the cache.By default this is the .cache directory under your project directory.161

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!