[PATCH] D48102: Improve handling of COPY instructions with identical value numbers

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 09:54:28 PDT 2018


tpr added a comment.

I'm trying out fixing up the LR like this:

  // If a subrange starts at the copy then an undefined value has been
  // copied and we must remove that subrange value as well.
  VNInfo *ValueOut = Q.valueOutOrDead();
  if (ValueOut != nullptr && Q.valueIn() == nullptr) {
    DEBUG(dbgs() << "\t\tPrune sublane " << PrintLaneMask(S.LaneMask)
                 << " at " << Def << "\n");
    SmallVector<SlotIndex, 4> EndPoints;
    LIS->pruneValue(S, Def, &EndPoints);
    DidPrune = true;
  
    // Mark value number as unused.
    ValueOut->markUnused();
  
    if (V.Identical) {
      // Ensure that liveness reaches the end points of the value that we
      // have just pruned.
      LIS->extendToIndices(S, EndPoints, ArrayRef<SlotIndex>());
    }
    S.verify();
    continue;
  }


Repository:
  rL LLVM

https://reviews.llvm.org/D48102





More information about the llvm-commits mailing list