[PATCH] D46329: [SelectionDAG] Selection of DBG_VALUE using a PHI node result (pt 2)
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 1 13:13:57 PDT 2018
vsk added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5267
+ V->getType(), false);
+ unsigned NumRegs =
+ std::accumulate(RFV.RegCount.begin(), RFV.RegCount.end(), 0);
----------------
Would it be more convenient to add a 'occupiesMultipleRegs()' predicate to RegsForValue?
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5273
+ auto RegisterVT = RFV.RegVTs.begin();
+ for (auto RegCount : RFV.RegCount) {
+ unsigned RegisterSize = (RegisterVT++)->getSizeInBits();
----------------
You might be able to simplify this by using zip_first(RegCount, RegVTs) (see STLExtras.h, or unittests/ADT/IteratorTest for example usage).
Repository:
rL LLVM
https://reviews.llvm.org/D46329
More information about the llvm-commits
mailing list