[PATCH] D71182: [NFC][llvm][MIRVRegNamerUtils] Making some stylistic changes to MIRVRegNamerUtils.cpp
Aditya Nandakumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 12:44:09 PST 2019
aditya_nandakumar added a comment.
I don't see how it's different for the hashing case.
On one side, you have
for (auto &Op: MI.uses())
Ops.push_back(HashOperand(Op));
On the other side,
llvm::transform(MI.uses(), std::back_inserter(Ops),
[&HashOperand](const MachineOperand &MO) { return HashOperand(MO); });
I definitely don't think second case is easier to read, shorter than the first case and I really see no value in using transform here when essentially all it's doing is to just add a bunch of operands to a list.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71182/new/
https://reviews.llvm.org/D71182
More information about the llvm-commits
mailing list