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

Victor Hernandez vhernandez at apple.com
Thu Jan 14 10:20:30 PST 2010


On Jan 14, 2010, at 9:39 AM, Devang Patel wrote:

> On Wed, Jan 13, 2010 at 5:45 PM, Victor Hernandez <vhernandez at apple.com> wrote:
>> Author: hernande
>> Date: Wed Jan 13 19:45:14 2010
>> New Revision: 93400
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=93400&view=rev
>> Log:
>> Add MDNode::getFunction(), which figures out the metadata's function, if it has function that it is local to.
> 
> so will this replace isFunctionLocal() ?

No, I don't think it should replace isFunctionLocal().  getFunction() is an expensive operation that should not be used in performance-critical tasks (currently it is only used when printing out ll files).  isFunctionLocal() is fast and will very rarely give a false positive (when a metadata is created function-local, but then the operands are modified later).


> -
> Devang





More information about the llvm-commits mailing list