[PATCH] D90079: CGLoopInfo: Avoid unnecessary uses of `MDNode::getTemporary`, NFC

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 23 15:20:18 PDT 2020


dexonsmith added a comment.

https://github.com/llvm/llvm-project/blob/master/llvm/lib/IR/Metadata.cpp#L716 is where the auto-detection of self-references is:

  // Drop uniquing for self-reference cycles and deleted constants.
  if (New == this || (!New && Old && isa<ConstantAsMetadata>(Old))) {
    if (!isResolved())
      resolve();
    storeDistinctInContext();
    return;
  }


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90079/new/

https://reviews.llvm.org/D90079



More information about the cfe-commits mailing list