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

Devang Patel devang.patel at gmail.com
Wed Dec 16 16:47:08 PST 2009


Victor,

On Wed, Dec 16, 2009 at 11:12 AM, Victor Hernandez <vhernandez at apple.com> wrote:
> 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.

There is not any global list of all metadatas. There is no need to
have one.  It is same as constants, There is not any  global list of
all constants.
-
Devang

>
> 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
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
-
Devang




More information about the llvm-commits mailing list