[PATCH] D82988: [RISCV] Avoid Splitting MBB in RISCVExpandPseudo

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 14:04:31 PDT 2020


lenary marked an inline comment as done.
lenary added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp:74-76
     MachineBasicBlock::iterator NMBBI = std::next(MBBI);
-    Modified |= expandMI(MBB, MBBI, NMBBI);
+    Modified |= expandMI(MBB, MBBI);
     MBBI = NMBBI;
----------------
Oh this loop can be simplifed - though I'm not sure I should be incrementing `MBBI` if we've inserted new instructions using `BuildMI`, which I think also increments the iterator automatically. Guidance here would be helpful.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82988/new/

https://reviews.llvm.org/D82988





More information about the llvm-commits mailing list