<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in MDBuilderTest.cpp</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>2946cd70 - Update the file headers across all of the LLVM projects in the monorepo</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp#2946cd70</link>
        <description>Update the file headers across all of the LLVM projects in the monorepoto reflect the new license.We understand that people may be surprised that we&apos;re moving the headerentirely to discuss the new license. We checked this carefully with theFoundation&apos;s lawyer and we believe this is the correct approach.Essentially, all code in the project is now made available by the LLVMproject under our new license, so you will see that the license headersinclude that license only. Some of our contributors have contributedcode under our old license, and accordingly, we have retained a copy ofour old license notice in the top-level files in each project andrepository.llvm-svn: 351636

            List of files:
            /llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp</description>
        <pubDate>Sat, 19 Jan 2019 08:50:56 +0000</pubDate>
        <dc:creator>Chandler Carruth &lt;chandlerc@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>5bf8fef5 - IR: Split Metadata from Value</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp#5bf8fef5</link>
        <description>IR: Split Metadata from ValueSplit `Metadata` away from the `Value` class hierarchy, as part ofPR21532.  Assembly and bitcode changes are in the wings, but this is thebulk of the change for the IR C++ API.I have a follow-up patch prepared for `clang`.  If this breaks othersub-projects, I apologize in advance :(.  Help me compile it on DarwinI&apos;ll try to fix it.  FWIW, the errors should be easy to fix, so it maybe simpler to just fix it yourself.This breaks the build for all metadata-related code that&apos;s out-of-tree.Rest assured the transition is mechanical and the compiler should catchalmost all of the problems.Here&apos;s a quick guide for updating your code:  - `Metadata` is the root of a class hierarchy with three main classes:    `MDNode`, `MDString`, and `ValueAsMetadata`.  It is distinct from    the `Value` class hierarchy.  It is typeless -- i.e., instances do    *not* have a `Type`.  - `MDNode`&apos;s operands are all `Metadata *` (instead of `Value *`).  - `TrackingVH&lt;MDNode&gt;` and `WeakVH` referring to metadata can be    replaced with `TrackingMDNodeRef` and `TrackingMDRef`, respectively.    If you&apos;re referring solely to resolved `MDNode`s -- post graph    construction -- just use `MDNode*`.  - `MDNode` (and the rest of `Metadata`) have only limited support for    `replaceAllUsesWith()`.    As long as an `MDNode` is pointing at a forward declaration -- the    result of `MDNode::getTemporary()` -- it maintains a side map of its    uses and can RAUW itself.  Once the forward declarations are fully    resolved RAUW support is dropped on the ground.  This means that    uniquing collisions on changing operands cause nodes to become    &quot;distinct&quot;.  (This already happened fairly commonly, whenever an    operand went to null.)    If you&apos;re constructing complex (non self-reference) `MDNode` cycles,    you need to call `MDNode::resolveCycles()` on each node (or on a    top-level node that somehow references all of the nodes).  Also,    don&apos;t do that.  Metadata cycles (and the RAUW machinery needed to    construct them) are expensive.  - An `MDNode` can only refer to a `Constant` through a bridge called    `ConstantAsMetadata` (one of the subclasses of `ValueAsMetadata`).    As a side effect, accessing an operand of an `MDNode` that is known    to be, e.g., `ConstantInt`, takes three steps: first, cast from    `Metadata` to `ConstantAsMetadata`; second, extract the `Constant`;    third, cast down to `ConstantInt`.    The eventual goal is to introduce `MDInt`/`MDFloat`/etc. and have    metadata schema owners transition away from using `Constant`s when    the type isn&apos;t important (and they don&apos;t care about referring to    `GlobalValue`s).    In the meantime, I&apos;ve added transitional API to the `mdconst`    namespace that matches semantics with the old code, in order to    avoid adding the error-prone three-step equivalent to every call    site.  If your old code was:        MDNode *N = foo();        bar(isa             &lt;ConstantInt&gt;(N-&gt;getOperand(0)));        baz(cast            &lt;ConstantInt&gt;(N-&gt;getOperand(1)));        bak(cast_or_null    &lt;ConstantInt&gt;(N-&gt;getOperand(2)));        bat(dyn_cast        &lt;ConstantInt&gt;(N-&gt;getOperand(3)));        bay(dyn_cast_or_null&lt;ConstantInt&gt;(N-&gt;getOperand(4)));    you can trivially match its semantics with:        MDNode *N = foo();        bar(mdconst::hasa               &lt;ConstantInt&gt;(N-&gt;getOperand(0)));        baz(mdconst::extract            &lt;ConstantInt&gt;(N-&gt;getOperand(1)));        bak(mdconst::extract_or_null    &lt;ConstantInt&gt;(N-&gt;getOperand(2)));        bat(mdconst::dyn_extract        &lt;ConstantInt&gt;(N-&gt;getOperand(3)));        bay(mdconst::dyn_extract_or_null&lt;ConstantInt&gt;(N-&gt;getOperand(4)));    and when you transition your metadata schema to `MDInt`:        MDNode *N = foo();        bar(isa             &lt;MDInt&gt;(N-&gt;getOperand(0)));        baz(cast            &lt;MDInt&gt;(N-&gt;getOperand(1)));        bak(cast_or_null    &lt;MDInt&gt;(N-&gt;getOperand(2)));        bat(dyn_cast        &lt;MDInt&gt;(N-&gt;getOperand(3)));        bay(dyn_cast_or_null&lt;MDInt&gt;(N-&gt;getOperand(4)));  - A `CallInst` -- specifically, intrinsic instructions -- can refer to    metadata through a bridge called `MetadataAsValue`.  This is a    subclass of `Value` where `getType()-&gt;isMetadataTy()`.    `MetadataAsValue` is the *only* class that can legally refer to a    `LocalAsMetadata`, which is a bridged form of non-`Constant` values    like `Argument` and `Instruction`.  It can also refer to any other    `Metadata` subclass.(I&apos;ll break all your testcases in a follow-up commit, when I propagatethis change to assembly.)llvm-svn: 223802

            List of files:
            /llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp</description>
        <pubDate>Tue, 09 Dec 2014 18:38:53 +0000</pubDate>
        <dc:creator>Duncan P. N. Exon Smith &lt;dexonsmith@apple.com&gt;</dc:creator>
    </item>
<item>
        <title>66f09ad0 - [C++11] Use &apos;nullptr&apos;.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp#66f09ad0</link>
        <description>[C++11] Use &apos;nullptr&apos;.llvm-svn: 210442

            List of files:
            /llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp</description>
        <pubDate>Sun, 08 Jun 2014 22:29:17 +0000</pubDate>
        <dc:creator>Craig Topper &lt;craig.topper@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>6b841f18 - Move MDBuilder&apos;s methods out of line.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp#6b841f18</link>
        <description>Move MDBuilder&apos;s methods out of line.Making them inline was a historical accident, they&apos;re neither hot nortemplated.llvm-svn: 206109

            List of files:
            /llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp</description>
        <pubDate>Sat, 12 Apr 2014 14:26:59 +0000</pubDate>
        <dc:creator>Benjamin Kramer &lt;benny.kra@googlemail.com&gt;</dc:creator>
    </item>
<item>
        <title>74b6a77d - Rename the VMCore unittest tree to IR. Somehow was missed when doing the</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp#74b6a77d</link>
        <description>Rename the VMCore unittest tree to IR. Somehow was missed when doing thelibrary rename.llvm-svn: 171747

            List of files:
            /llvm-project-15.0.7/llvm/unittests/IR/MDBuilderTest.cpp</description>
        <pubDate>Mon, 07 Jan 2013 15:35:46 +0000</pubDate>
        <dc:creator>Chandler Carruth &lt;chandlerc@gmail.com&gt;</dc:creator>
    </item>
</channel>
</rss>
