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

Victor Hernandez vhernandez at apple.com
Wed Dec 16 11:12:14 PST 2009


Dan,

Initially, function-localness is going to be used to verify that metadata that refers to function-local IR is only used in that function.  I want to be able to detect inlining bugs where the metadata was incorrectly cloned.

In the long term, I believe that function-localness will allow us to avoid iterating over the complete list of global metadata while determining if a cloned or modified instruction is used by any metadata.

Victor

On Dec 16, 2009, at 10:05 AM, Dan Gohman wrote:

> 
> 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