[PATCH] D46329: [SelectionDAG] Selection of DBG_VALUE using a PHI node result (pt 2)
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 1 13:33:49 PDT 2018
bjope added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5273
+ auto RegisterVT = RFV.RegVTs.begin();
+ for (auto RegCount : RFV.RegCount) {
+ unsigned RegisterSize = (RegisterVT++)->getSizeInBits();
----------------
vsk wrote:
> You might be able to simplify this by using zip_first(RegCount, RegVTs) (see STLExtras.h, or unittests/ADT/IteratorTest for example usage).
I basically stole this code/loop from EmitFuncArgumentDbgValue (line ~4917). But your suggestion sounds like a really good idea.
May I suggest a follow up commit to refactor this and the code in EmitFuncArgumentDbgValue at the same time? Or is it preferred to have this one nice-looking from the start? (I can totally but that...)
Repository:
rL LLVM
https://reviews.llvm.org/D46329
More information about the llvm-commits
mailing list