[PATCH] D15144: [mips[microMIPS]] Adding code size reduction pass for MicroMIPS
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 11:07:44 PDT 2017
sdardis accepted this revision.
sdardis added a comment.
This revision is now accepted and ready to land.
LGTM. Some small nits inlined.
================
Comment at: lib/Target/Mips/MicroMipsSizeReduction.cpp:18
+#include "MipsSubtarget.h"
+
+#include "llvm/ADT/Statistic.h"
----------------
Spurious empty line.
================
Comment at: lib/Target/Mips/MicroMipsSizeReduction.cpp:185
+static bool IsSP(const MachineOperand &MO) {
+ if (MO.isReg() && ((MO.getReg() == Mips::SP) || (MO.getReg() == Mips::SP_64)))
+ return true;
----------------
This shouldn't have SP_64 in the conditional as this pass doesn't support microMIPS in 64 bit mode yet..
================
Comment at: test/CodeGen/Mips/llvm-ir/add.ll:27
; RUN: -check-prefixes=ALL,R2-R6,GP64
; RUN: llc < %s -march=mips -mcpu=mips32r3 -mattr=+micromips -O2 | FileCheck %s \
; RUN: -check-prefixes=ALL,MMR6,MM32
----------------
Add -verify-machineinstrs to the parameters here. We want to know early if the generated machine code is malformed.
================
Comment at: test/CodeGen/Mips/llvm-ir/sub.ll:13
; RUN: -check-prefixes=R2-R6,GP32,GP32-NOT-MM,NOT-MM
; RUN: llc < %s -march=mips -mcpu=mips32r3 -mattr=+micromips | FileCheck %s \
; RUN: -check-prefixes=GP32-MM,GP32,MM
----------------
Add -verify-machineinstrs to the parameters here. We want to know early if the generated machine code is malformed.
================
Comment at: test/CodeGen/Mips/micromips-sizereduction/micromips-lwsp-swsp.ll:1
+; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+micromips -asm-show-inst < %s | FileCheck %s
+
----------------
Add -verify-machineinstrs to the parameters here. We want to know early if the generated machine code is malformed.
https://reviews.llvm.org/D15144
More information about the llvm-commits
mailing list