diff graal/com.oracle.max.cri/src/com/sun/cri/ci/CiTarget.java @ 4181:319860ae697a

Simplify FrameMap: make offsets of spill slots and outgoing parameters independent so that they can be allocated at the same time, eliminating the separate phases. This makes the separate StackBlock unnecesary. Change CiStackSlot to use byte offsets instead of spill slot index. This makes CiTarget.spillSlotSize unnecessary.
author Christian Wimmer <Christian.Wimmer@Oracle.com>
date Mon, 02 Jan 2012 14:16:08 -0800
parents e233f5660da4
children
line wrap: on
line diff
--- a/graal/com.oracle.max.cri/src/com/sun/cri/ci/CiTarget.java	Mon Jan 02 22:18:16 2012 +0100
+++ b/graal/com.oracle.max.cri/src/com/sun/cri/ci/CiTarget.java	Mon Jan 02 14:16:08 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,21 +41,11 @@
     public final boolean isMP;
 
     /**
-     * The number of {@link #spillSlotSize spill slots} required per kind.
-     */
-    private final int[] spillSlotsPerKindMap;
-
-    /**
      * Specifies if this target supports encoding objects inline in the machine code.
      */
     public final boolean inlineObjects;
 
     /**
-     * The spill slot size for values that occupy 1 {@linkplain CiKind#sizeInSlots() Java slot}.
-     */
-    public final int spillSlotSize;
-
-    /**
      * The machine word size on this target.
      */
     public final int wordSize;
@@ -107,7 +97,6 @@
 
     public CiTarget(CiArchitecture arch,
              boolean isMP,
-             int spillSlotSize,
              int stackAlignment,
              int pageSize,
              int cacheAlignment,
@@ -117,7 +106,6 @@
         this.arch = arch;
         this.pageSize = pageSize;
         this.isMP = isMP;
-        this.spillSlotSize = spillSlotSize;
         this.wordSize = arch.wordSize;
         if (wordSize == 8) {
             this.wordKind = CiKind.Long;
@@ -128,19 +116,8 @@
         this.stackBias = 0; // TODO: configure with param once SPARC port exists
         this.cacheAlignment = cacheAlignment;
         this.inlineObjects = inlineObjects;
-        this.spillSlotsPerKindMap = new int[CiKind.values().length];
         this.debugInfoDoubleWordsInSecondSlot = debugInfoDoubleWordsInSecondSlot;
         this.invokeSnippetAfterArguments = invokeSnippetAfterArguments;
-
-        for (CiKind k : CiKind.values()) {
-            // initialize the number of spill slots required for each kind
-            int size = sizeInBytes(k);
-            int slots = 0;
-            while (slots * spillSlotSize < size) {
-                slots++;
-            }
-            spillSlotsPerKindMap[k.ordinal()] = slots;
-        }
     }
 
     /**
@@ -168,15 +145,6 @@
     }
 
     /**
-     * Gets the number of spill slots for a specified kind in this target.
-     * @param kind the kind for which to get the spill slot count
-     * @return the number of spill slots for {@code kind}
-     */
-    public int spillSlots(CiKind kind) {
-        return spillSlotsPerKindMap[kind.ordinal()];
-    }
-
-    /**
      * Aligns the given frame size (without return instruction pointer) to the stack
      * alignment size and return the aligned size (without return instruction pointer).
      * @param frameSize the initial frame size to be aligned