[PATCH] D73152: [PHIElimination] Compile time optimization for huge functions.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 13:41:02 PST 2020


qcolombet accepted this revision.
qcolombet added a comment.

LGTM with a nit. Use a reference instead of a pointer (or check the pointer and fallback to the old addNewBlock when the pointer is nullptr)



================
Comment at: llvm/lib/CodeGen/LiveVariables.cpp:820
+
+  SparseBitVector<> &BV = (*LiveInSets)[SuccBB->getNumber()];
+  for (auto R = BV.begin(), E = BV.end(); R != E; R++) {
----------------
Shouldn't you check that LiveInSets is not nullptr?
Otherwise, use a reference in the API.


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

https://reviews.llvm.org/D73152





More information about the llvm-commits mailing list