Added function computeOffsetforLocalVar to check how big the
authorVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 18 Mar 2002 03:23:29 +0000 (03:23 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 18 Mar 2002 03:23:29 +0000 (03:23 +0000)
offset-from-FP will be before allocating space for a local variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1900 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineCodeForMethod.h
include/llvm/CodeGen/MachineFunction.h

index 3ef4b10d3ff3d9216c34b8457b99ab5cbca70c1a..631e823719d13b9d2214d8bdf7c808fc233eda97 100644 (file)
@@ -31,7 +31,6 @@ class MachineCodeForMethod : private Annotation {
   unsigned     currentTmpValuesSize;
   std::hash_set<const Constant*> constantsForConstPool;
   std::hash_map<const Value*, int> offsets;
-  // hash_map<const Value*, int> offsetsFromSP;
   
 public:
   /*ctor*/      MachineCodeForMethod(const Method* method,
@@ -72,6 +71,10 @@ public:
   
   inline void     markAsLeafMethod()              { compiledAsLeaf = true; }
   
+  int             computeOffsetforLocalVar (const TargetMachine& target,
+                                            const Value* local,
+                                            unsigned int size = 0);
+  
   int             allocateLocalVar         (const TargetMachine& target,
                                             const Value* local,
                                             unsigned int size = 0);
index 3ef4b10d3ff3d9216c34b8457b99ab5cbca70c1a..631e823719d13b9d2214d8bdf7c808fc233eda97 100644 (file)
@@ -31,7 +31,6 @@ class MachineCodeForMethod : private Annotation {
   unsigned     currentTmpValuesSize;
   std::hash_set<const Constant*> constantsForConstPool;
   std::hash_map<const Value*, int> offsets;
-  // hash_map<const Value*, int> offsetsFromSP;
   
 public:
   /*ctor*/      MachineCodeForMethod(const Method* method,
@@ -72,6 +71,10 @@ public:
   
   inline void     markAsLeafMethod()              { compiledAsLeaf = true; }
   
+  int             computeOffsetforLocalVar (const TargetMachine& target,
+                                            const Value* local,
+                                            unsigned int size = 0);
+  
   int             allocateLocalVar         (const TargetMachine& target,
                                             const Value* local,
                                             unsigned int size = 0);