[llvm-commits] [llvm] r91497 - in /llvm/trunk: include/llvm/Metadata.h lib/VMCore/Metadata.cpp

Dan Gohman gohman at apple.com
Wed Dec 16 10:05:46 PST 2009


On Dec 16, 2009, at 12:13 AM, Victor Hernandez wrote:

> Nick,
> 
> Thanks for the review.
> 
> On Dec 15, 2009, at 10:47 PM, Nick Lewycky wrote:
> 
>> Victor Hernandez wrote:
>>> Author: hernande
>>> Date: Tue Dec 15 20:52:09 2009
>>> New Revision: 91497
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=91497&view=rev
>>> Log:
>>> MDNodes that refer to an instruction are local to a function; in that case, explicitly keep track of the function they are local to
>> 
>> So what's the semantic here? What if the MDNode refers to an Instruction that gets spliced from one Function to another? What happens if the MDNode is attached to an Instruction that's RAUW'd with a Constant?
>> 
>> Is this new field copied by MetadataContextImpl::copyMD?
> 
> The semantic is that if an MDNode is created function-local, then it will continue to be function-local even if its operands are modified to no longer refer to any function-specific IR.  I need to add that documentation to Metadata.h.

What is this concept of function localness going to be used for?

Dan





More information about the llvm-commits mailing list