[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
Wed Nov 16 15:51:05 PST 2022


arsenm requested changes to this revision.
arsenm added a comment.
This revision now requires changes to proceed.
Herald added a project: All.

analyzeBranch should probably be a separate patch



================
Comment at: llvm/lib/Target/MSP430/MSP430CommonEpilogueOptimizer.cpp:151
+    auto Terminator = MBB.getFirstTerminator(), End = MBB.end();
+    while (Terminator != End) {
+      // Increment before changing the instruction list
----------------
can you use make_early_inc_range?


================
Comment at: llvm/test/CodeGen/MSP430/mspabi-func-epilog-multi-terminators.mir:8-16
+--- |
+  target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
+  target triple = "msp430"
+
+  define i16 @pops_1_reg() {
+    call void asm sideeffect "", "~{r10}"()
+    ret i16 42
----------------
Can drop IR section 


================
Comment at: llvm/test/CodeGen/MSP430/mspabi-func-epilog-special-cases.ll:4
+target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
+target triple = "msp430"
+
----------------
Move to -mtriple and drop datalayout 


================
Comment at: llvm/test/CodeGen/MSP430/mspabi-func-epilog.ll:8-9
+
+target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
+target triple = "msp430"
+
----------------
Ditto 


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