[llvm-commits] [llvm-gcc-4.2] r79668 - in /llvm-gcc-4.2/trunk/gcc: Makefile.in config/s390/s390.c config/s390/s390.h

Anton Korobeynikov asl at math.spbu.ru
Fri Aug 21 13:14:07 PDT 2009


Author: asl
Date: Fri Aug 21 15:14:06 2009
New Revision: 79668

URL: http://llvm.org/viewvc/llvm-project?rev=79668&view=rev
Log:
Hook systemz backend

Modified:
    llvm-gcc-4.2/trunk/gcc/Makefile.in
    llvm-gcc-4.2/trunk/gcc/config/s390/s390.c
    llvm-gcc-4.2/trunk/gcc/config/s390/s390.h

Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/Makefile.in?rev=79668&r1=79667&r2=79668&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/Makefile.in (original)
+++ llvm-gcc-4.2/trunk/gcc/Makefile.in Fri Aug 21 15:14:06 2009
@@ -1160,6 +1160,7 @@
     sparcv9-*-*) echo sparc;; \
     spu-*-*) echo cellspu;; \
     tce-*-*) echo tce;; \
+    s390x-*-*) echo systemz;; \
    esac
 LLVMTARGETOBJ := $(shell $(LLVMTARGETCOMPONENT))
 

Modified: llvm-gcc-4.2/trunk/gcc/config/s390/s390.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/s390/s390.c?rev=79668&r1=79667&r2=79668&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/s390/s390.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/s390/s390.c Fri Aug 21 15:14:06 2009
@@ -52,6 +52,11 @@
 #include "optabs.h"
 #include "tree-gimple.h"
 
+/* LLVM LOCAL begin */
+#ifdef ENABLE_LLVM
+#undef INSN_SCHEDULING
+#endif
+/* LLVM LOCAL end */
 
 /* Define the specific costs for a given cpu.  */
 
@@ -4196,7 +4201,9 @@
   if (ac.aligned && MEM_P (cmp))
     {
       cmpv = force_reg (SImode, val);
-      store_bit_field (cmpv, GET_MODE_BITSIZE (mode), 0, SImode, cmp);
+      /* LLVM LOCAL begin */
+      store_bit_field (cmpv, GET_MODE_BITSIZE (mode), 0, SImode, cmp, NULL_TREE);
+      /* LLVM LOCAL end */
     }
   else
     cmpv = force_reg (SImode, expand_simple_binop (SImode, IOR, cmp, val,
@@ -4204,7 +4211,9 @@
   if (ac.aligned && MEM_P (new))
     {
       newv = force_reg (SImode, val);
-      store_bit_field (newv, GET_MODE_BITSIZE (mode), 0, SImode, new);
+      /* LLVM LOCAL begin */
+      store_bit_field (newv, GET_MODE_BITSIZE (mode), 0, SImode, new, NULL_TREE);
+      /* LLVM LOCAL end */
     }
   else
     newv = force_reg (SImode, expand_simple_binop (SImode, IOR, new, val,
@@ -4281,7 +4290,9 @@
       /* FALLTHRU */
     case SET: 
       if (ac.aligned && MEM_P (val))
-	store_bit_field (new, GET_MODE_BITSIZE (mode), 0, SImode, val);
+        /* LLVM LOCAL begin */
+	store_bit_field (new, GET_MODE_BITSIZE (mode), 0, SImode, val, NULL_TREE);
+	/* LLVM LOCAL end */
       else
 	{
 	  new = expand_simple_binop (SImode, AND, new, ac.modemaski,
@@ -5033,7 +5044,11 @@
 
   /* We need correct insn addresses.  */
 
+  /* LLVM LOCAL begin */
+#ifdef INSN_SCHEDULING
   shorten_branches (get_insns ());
+#endif
+  /* LLVM LOCAL end */
 
   /* Find all branches that exceed 64KB, and split them.  */
 
@@ -5724,7 +5739,11 @@
     }
 
   /* We need correct insn addresses.  */
+  /* LLVM LOCAL begin */
+#ifdef INSN_SCHEDULING
   shorten_branches (get_insns ());
+#endif
+  /* LLVM LOCAL end */
 
   /* On zSeries, we use a LARL to load the pool register.  The pool is
      located in the .rodata section, so we emit it after the function.  */
@@ -5848,8 +5867,11 @@
 
 
   /* We need correct insn addresses.  */
-
+  /* LLVM LOCAL begin */
+#ifdef INSN_SCHEDULING
   shorten_branches (get_insns ());
+#endif
+  /* LLVM LOCAL end */
 
   /* Scan all insns and move literals to pool chunks.  */
 
@@ -6092,7 +6114,11 @@
   /* Recompute insn addresses.  */
 
   init_insn_lengths ();
+  /* LLVM LOCAL begin */
+#ifdef INSN_SCHEDULING
   shorten_branches (get_insns ());
+#endif
+  /* LLVM LOCAL end */
 
   return pool_list;
 }

Modified: llvm-gcc-4.2/trunk/gcc/config/s390/s390.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/s390/s390.h?rev=79668&r1=79667&r2=79668&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/s390/s390.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/s390/s390.h Fri Aug 21 15:14:06 2009
@@ -30,6 +30,16 @@
 #include <config/s390/fixdfdi.h>
 #endif
 
+/* LLVM LOCAL begin */
+#ifdef ENABLE_LLVM
+/* LLVM_TARGET_NAME - This specifies the name of the target, which correlates to
+ * the llvm::InitializeXXXTarget() function.
+ */
+#define LLVM_TARGET_NAME SystemZ
+#endif
+/* LLVM LOCAL end */
+
+
 /* Which processor to generate code or schedule for. The cpu attribute
    defines a list that mirrors this list, so changes to s390.md must be
    made at the same time.  */





More information about the llvm-commits mailing list