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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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.Header FilesMany applications include all header files in each module, often by including them all within a singleinclude file. Processing header files takes time. It is a good programming practice to only include theheader files that are really required in a module, because:• it is clear what interfaces are used by a module• an incremental build after modifying a header file results in less modules required to be rebuild• it reduces compile timeParallel BuildThe make utility amk, which is used by Eclipse, has a feature to build jobs in parallel. This means thatmultiple modules can be compiled in parallel. With today's multi-core processors this means that eachcore can be fully utilized. In practice even on single core machines the compile time decreases whenusing parallel jobs. On multi-core machines the build time even improves further when specifying moreparallel jobs than the number of cores.In Eclipse you can control the parallel build behavior:1. From the Project menu, select Properties <strong>for</strong>159

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

Saved successfully!

Ooh no, something went wrong!