[PATCH] D19172: New optimization bisect implementation (now modeled on optnone handling)

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 02:23:35 PDT 2016


dsanders added a comment.

I don't know our MIPS16 implementation as well as the rest of the MIPS implementation but...


================
Comment at: lib/Target/Mips/Mips16HardFloat.cpp:526-528
@@ -525,2 +525,5 @@
 bool Mips16HardFloat::runOnModule(Module &M) {
+  if (skipModule(M))
+    return false;
+
   DEBUG(errs() << "Run on Module Mips16HardFloat\n");
----------------
MatzeB wrote:
> I have a hard time judging whether this is optional or required. Maybe separate this bit into an own patch and ask the target maintainers for a review.
I think this pass is required. It's injecting code to fix up the calling convention when MIPS hardfloat code calls MIPS16 softfloat code or the other way around. MIPS16 doesn't have any opcodes for floating point operations so it's always softfloat but the MIPS instruction set can be either softfloat or hardfloat (it's usually hardfloat regardless of whether an FPU is present or not).

It's not relevant to this patch but it's also removing the 'use-soft-float' attribute when it sees that the MIPS16 instruction set is not selected. This sounds dangerous to me since you generally use soft-float because hard-float isn't usable for some reason. We'll have to look into this at some point.

================
Comment at: lib/Target/Mips/MipsOs16.cpp:112-114
@@ -111,2 +111,5 @@
 bool MipsOs16::runOnModule(Module &M) {
+  if (skipModule(M))
+    return false;
+
   bool usingMask = Mips32FunctionMask.length() > 0;
----------------
MatzeB wrote:
> dito.
This pass looks optional to me. It seems to be forcing the use of the MIPS16 or MIPS instruction set depending on whether floating point operations are present or not (MIPS16 can only do softfloat). If it's skipped then the code might be bigger/slower but it should still function.


Repository:
  rL LLVM

http://reviews.llvm.org/D19172





More information about the llvm-commits mailing list