[PATCH] D47959: [DAG] Avoid needing to walk out legalization tables. NFCI.

Noel Grandin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 8 14:00:40 PDT 2018


grandinj added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h:160
+    ++NextValueId;
+    return ValueToIdMap[V];
+  }
----------------
cheaper just to return NextValueId-1 here? 

Also, if you want to catch wraparound, it's a good place to stick
    assert(NextValueId !=0 && "wraparound, need to implement compactifcation")


Repository:
  rL LLVM

https://reviews.llvm.org/D47959





More information about the llvm-commits mailing list