[llvm-commits] [llvm] r99928 - in /llvm/trunk: include/llvm/ include/llvm/CodeGen/ include/llvm/Support/ include/llvm/Target/ include/llvm/Transforms/Utils/ lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/PowerPC/ lib/Target/X86/ lib/Target/XCore/ lib/Transforms/InstCombine/ lib/Transforms/Scalar/ lib/Transforms/Utils/ lib/VMCore/ test/Analysis/BasicAA/ test/Transforms/InstCombine/ test/Transforms/MemCpyOpt/ test/Transforms/SimplifyLibCalls/ test/Verifier/
Chris Lattner
clattner at apple.com
Tue Mar 30 22:22:47 PDT 2010
On Mar 30, 2010, at 10:11 PM, Duncan Sands wrote:
> Hi Mon Ping,
>
>> Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
>> e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
>> A update of langref will occur in a subsequent checkin.
>
> I'm trying to imagine situations in which a volatile mem* call is useful, but I
> didn't come up with anything very convincing yet. Can you please explain what
> you have in mind.
volatile struct foo X, Y;
X = Y;
Should lower to a 'volatile memcpy'. Knowing that a memcpy is volatile allows the optimizer (e.g. memcpyopt) to avoid touching them.
-Chris
More information about the llvm-commits
mailing list