[llvm-commits] [llvm] r111913 - /llvm/trunk/lib/AsmParser/LLParser.h

Dan Gohman gohman at apple.com
Tue Aug 24 07:31:06 PDT 2010


Author: djg
Date: Tue Aug 24 09:31:06 2010
New Revision: 111913

URL: http://llvm.org/viewvc/llvm-project?rev=111913&view=rev
Log:
Add a comment explaining why this code is more complex than it
initially seems it should require.

Modified:
    llvm/trunk/lib/AsmParser/LLParser.h

Modified: llvm/trunk/lib/AsmParser/LLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.h?rev=111913&r1=111912&r2=111913&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.h (original)
+++ llvm/trunk/lib/AsmParser/LLParser.h Tue Aug 24 09:31:06 2010
@@ -80,6 +80,14 @@
     
     // Instruction metadata resolution.  Each instruction can have a list of
     // MDRef info associated with them.
+    //
+    // The simpler approach of just creating temporary MDNodes and then calling
+    // RAUW on them when the definition is processed doesn't work because some
+    // instruction metadata kinds, such as dbg, get stored in the IR in an
+    // "optimized" format which doesn't participate in the normal value use
+    // lists. This means that RAUW doesn't work, even on temporary MDNodes
+    // which otherwise support RAUW. Instead, we defer resolving MDNode
+    // references until the definitions have been processed.
     struct MDRef {
       SMLoc Loc;
       unsigned MDKind, MDSlot;





More information about the llvm-commits mailing list