[PATCH] D84397: [MSP430] Replace known epilogues with branches to __mspabi_func_epilog_N

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 18:26:38 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/lib/Target/MSP430/MSP430CommonEpilogueOptimizer.cpp:146
+bool MSP430CommonEpilogueOptimizer::runOnMachineFunction(MachineFunction &MF) {
+  TII = static_cast<const MSP430InstrInfo *>(MF.getSubtarget().getInstrInfo());
+
----------------
 getSubtarget<MSP430Subtarget>().getInstrInfo(() should work and is cleaner


================
Comment at: llvm/lib/Target/MSP430/MSP430InstrInfo.cpp:187-193
+    if (I->getOpcode() == MSP430::Bi || I->getOpcode() == MSP430::Br ||
+        I->getOpcode() == MSP430::Bm) {
+      if (AllowModify) {
+        MBB.erase(std::next(I), MBB.end());
+      }
       return true;
+    }
----------------
This seems like a different patch. Also does AllowModify actually happen?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84397



More information about the llvm-commits mailing list