[llvm-commits] [Patch] Teach basic alias analysis about inline asm "memory" clobber
richard at xmos.com
Wed Mar 28 09:52:53 PDT 2012
My understanding is that with gcc inline asm the "memory" clobber should
be specified whenever an asm statement may access memory that isn't
accessible via one of its operands.
For example with the following code:
x = 1;
x = 2;
gcc 4.4.3 optimizes away the first store to x. This optimization is
disabled if "memory" is listed as one of the clobbers. This patch
teaches basic alias analysis that calls to inline asm without the
"memory" clobber only access their argument pointers.
Richard Osborne | XMOS
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1822 bytes
Desc: not available
More information about the llvm-commits