All write operations via pointer are destructive. The compiler
does not reuse the contents of registers when variables are accessed
through pointers.
µVision
Options — C166 — Alias Checking
on Pointer Accesses.
Description
It is common practice for the compiler to copy a variable's value
into a register for fast, temporary access. However, when the value
is changed through a pointer to the variable, the contents of the
register must be re-synchronized. The technique which does this is
known as alias checking. It is enabled by default.
The NOALIAS directive instructs the compiler to ignore
pointer write operations during the optimization phase. If a register
holds a variable, the variable is reused, even when access through a
pointer might have modified that variable.
If you are confident that certain functions in your program do not
modify variables through pointers, the NOALIAS directive may
be used to reduce program size.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.