[llvm-dev] Return on nocapture pointer (original) (raw)
Piotr Padlewski via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 28 08:22:13 PDT 2017
- Previous message: [llvm-dev] Any sub-project in llvm to help with
- Next message: [llvm-dev] Return on nocapture pointer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I have a question about semantics of nocapture attribute: "This indicates that the callee does not make any copies of the pointer that outlive the callee itself. " Is returing a pointer considered outliving callee? For example is this code valid:
define i8* @foo(i8* nocapture %p) ret i8* %p }
The documentation also mention that " This is not a valid attribute for return values.", but I interpret that it is is about this case:
declare i8* nocapture @bar(i8* %p)
Piotr -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170428/daaadf50/attachment.html>
- Previous message: [llvm-dev] Any sub-project in llvm to help with
- Next message: [llvm-dev] Return on nocapture pointer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]