There were two sections of code that had a lot of lambdas and in the patch
D40554 it was suggested that we clean them up as a follow-up NFC patch.
Details
Details
- Reviewers
nemanjai - Group Reviewers
Restricted Project - Commits
- rGe329788bf83c: [NFC][PowerPC] Clean up a couple of lambdas from the PPCMIPeephole.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I don't think another review cycle is needed to address the slight change I proposed.
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp | ||
---|---|---|
792–797 | I think that even converting the lambdas into just Boolean variables might make it more readable. Something like: bool SourceIsXForm = SrcOpcode == PPC::LHZX; bool MIIs64Bit = MI.getOpcode() == PPC::EXTSH8 || MI.getOpcode() == PPC::EXTSH8_32_64; if (SourceIsXForm && MIIs64Bit) Opc = PPC::LHAX8; else if (SourceIsXForm && !MIIs64Bit) Opc = PPC::LHAX; else if (MIIs64Bit) Opc = PPC::LHA8; |
I think that even converting the lambdas into just Boolean variables might make it more readable. Something like: