[cfe-dev] [RFC] add Function Attribute to disable optimization

Sean Silva silvas at purdue.edu
Mon Jun 17 15:23:07 PDT 2013


On Mon, Jun 17, 2013 at 10:29 AM, Jeffrey Walton <noloader at gmail.com> wrote:
>
>
> First is to ensure dead-writes are not removed. For example, a
> function that zeroizes or wipes memory is subject to removal during
> optimization. I often have to look at program's disassembly to ensure
> the memset is not removed by the optimizer.
>

Appropriate use of `volatile` is probably sufficient for this use case.

-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130617/75428094/attachment.html>


More information about the cfe-dev mailing list