[PATCH] D125335: Pass lamba to MachineCopyProp to determine which MI is treated as Copy instruction.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 13:44:11 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:298
+ if (UseCopyInstr || EnableCopyInstr) {
+ PredicateCopy = [](const MachineInstr &MI) {
+ const TargetInstrInfo *TII = MI.getMF()->getSubtarget().getInstrInfo();
----------------
Why do you need a lambda inside the pass? Can't you pass around the bool and TII? And have a static function that takes MI, TII, and the bool and does the right thing?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125335/new/
https://reviews.llvm.org/D125335
More information about the llvm-commits
mailing list