From: Vikram S. Adve Date: Mon, 18 Mar 2002 03:23:29 +0000 (+0000) Subject: Added function computeOffsetforLocalVar to check how big the X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ce0845aeba7f0b0f5bf33523755c25e2bb09eac1;p=oota-llvm.git Added function computeOffsetforLocalVar to check how big the 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 --- diff --git a/include/llvm/CodeGen/MachineCodeForMethod.h b/include/llvm/CodeGen/MachineCodeForMethod.h index 3ef4b10d3ff..631e823719d 100644 --- a/include/llvm/CodeGen/MachineCodeForMethod.h +++ b/include/llvm/CodeGen/MachineCodeForMethod.h @@ -31,7 +31,6 @@ class MachineCodeForMethod : private Annotation { unsigned currentTmpValuesSize; std::hash_set constantsForConstPool; std::hash_map offsets; - // hash_map 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); diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 3ef4b10d3ff..631e823719d 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -31,7 +31,6 @@ class MachineCodeForMethod : private Annotation { unsigned currentTmpValuesSize; std::hash_set constantsForConstPool; std::hash_map offsets; - // hash_map 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);