[PATCH] Beginning of alloca implementation for Mips fast-isel

Eric Christopher echristo at gmail.com
Wed Feb 18 16:33:22 PST 2015


You missed a few comments. I've redone them inline and added more.

Thanks!

-eric


================
Comment at: lib/Target/Mips/MipsFastISel.cpp:1
@@ -1,2 +1,2 @@
-//===-- MipsastISel.cpp - Mips FastISel implementation
-//---------------------===//
+//===-- MipsFastISel.cpp - Mips FastISel implementation -----------===//
+//
----------------
Go ahead and fix this up in a separate commit. Pre-approved.


================
Comment at: lib/Target/Mips/MipsFastISel.cpp:332
@@ -305,9 +331,3 @@
 
-bool MipsFastISel::computeAddress(const Value *Obj, Address &Addr) {
-  // This construct looks a big awkward but it is how other ports handle this
-  // and as this function is more fully completed, these cases which
-  // return false will have additional code in them.
-  //
-  if (isa<Instruction>(Obj))
-    return false;
-  else if (isa<ConstantExpr>(Obj))
+bool MipsFastISel::computeAddress(const Value *Obj, Address &Addr, Type *Ty) {
+
----------------
Ty appears still unused?

================
Comment at: lib/Target/Mips/MipsFastISel.cpp:667
@@ +666,3 @@
+  if (Addr.isRegBase()) {
+    if (!isInt<16>(Addr.getOffset()))
+      Addr = materializeOffset(Addr);
----------------
I think the frequent offset checks are going to be inherently buggy. How about doing something ala ARMComputeAddress (or the equivalent in aarch64)?

================
Comment at: test/CodeGen/Mips/Fast-ISel/overflt.ll:6
@@ +5,3 @@
+
+ at x = common global [128000 x float] zeroinitializer, align 4
+ at y = global float* getelementptr inbounds ([128000 x float]* @x, i32 0, i32 0), align 4
----------------
Is this from C code?

http://reviews.llvm.org/D6426

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list