[llvm-commits] [llvm] r61019 - in /llvm/trunk: docs/AliasAnalysis.html docs/LangRef.html include/llvm/Attributes.h lib/AsmParser/LLLexer.cpp lib/AsmParser/llvmAsmParser.y lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp lib/VMCore/Attributes.cpp

Duncan Sands baldrick at free.fr
Mon Dec 15 02:57:35 PST 2008

Hi Nick,

> Introducing nocapture, a parameter attribute for pointers to indicate that the
> callee will not introduce any new aliases of that pointer.

if I understand right, this attribute means that the pointer is only dereferenced:
no bits of the pointer value itself are otherwise used or escape.

> +    <dt><tt>nocapture</tt></dt>
> +    <dd>This indicates that the callee does not make any copies of the pointer
> +    that outlive the callee itself. This is not a valid attribute for return
> +    values.</dd>

I think you should mention that callee does not copy even one bit.  Because if
it is allowed to, it is easy to construct examples where the whole pointer value
escapes through multiple calls.



More information about the llvm-commits mailing list