Optimize MDNode to coallocate the operand list immediately
authorChris Lattner <sabre@nondot.org>
Thu, 31 Dec 2009 01:05:46 +0000 (01:05 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 31 Dec 2009 01:05:46 +0000 (01:05 +0000)
commitb76359e36e75dfe16c5153c3cac903efbb2cd8d7
tree289a79ca7ed2cd8b1bf9563b0a473e435aef5654
parentcc7b011728b9e8c3574247b81f79689840b3d33a
Optimize MDNode to coallocate the operand list immediately
after the MDNode in memory.  This eliminates the operands
pointer and saves a new[] per node.

Note that the code in DIDerivedType::replaceAllUsesWith is wrong
and quite scary.  A MDNode should not be RAUW'd with something
else: this changes all uses of the mdnode, which may not be debug
info related!  Debug info should use something non-mdnode for
declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92321 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Metadata.h
lib/Analysis/DebugInfo.cpp
lib/VMCore/Metadata.cpp