aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/MachineFunctionInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-18 18:13:37 +0000
committerChris Lattner <sabre@nondot.org>2004-08-18 18:13:37 +0000
commita1e51ff2aa965467632e761774e33ce191f602e7 (patch)
tree53b834292fcab5b3240cb205d99eff6132cf77b3 /lib/Target/SparcV9/MachineFunctionInfo.cpp
parent8bdf87d1d8abde45c40b2698dd9af8407007281c (diff)
downloadexternal_llvm-a1e51ff2aa965467632e761774e33ce191f602e7.zip
external_llvm-a1e51ff2aa965467632e761774e33ce191f602e7.tar.gz
external_llvm-a1e51ff2aa965467632e761774e33ce191f602e7.tar.bz2
Convert to the new MachineFunctionInfo interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/MachineFunctionInfo.cpp')
-rw-r--r--lib/Target/SparcV9/MachineFunctionInfo.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/lib/Target/SparcV9/MachineFunctionInfo.cpp b/lib/Target/SparcV9/MachineFunctionInfo.cpp
index eb66aa0..f308bf5 100644
--- a/lib/Target/SparcV9/MachineFunctionInfo.cpp
+++ b/lib/Target/SparcV9/MachineFunctionInfo.cpp
@@ -1,4 +1,4 @@
-//===-- MachineFunctionInfo.cpp -------------------------------------------===//
+//===-- SparcV9FunctionInfo.cpp -------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -20,15 +20,6 @@
#include "llvm/Target/TargetFrameInfo.h"
using namespace llvm;
-MachineFunctionInfo *MachineFunction::getInfo() const {
- if (!MFInfo) {
- MFInfo = new MachineFunctionInfo(*const_cast<MachineFunction*>(this));
- }
- return static_cast<MachineFunctionInfo*>(MFInfo);
-}
-
-
-
static unsigned
ComputeMaxOptionalArgsSize(const TargetMachine& target, const Function *F,
unsigned &maxOptionalNumArgs)
@@ -78,7 +69,7 @@ SizeToAlignment(unsigned size, const TargetMachine& target)
}
-void MachineFunctionInfo::CalculateArgSize() {
+void SparcV9FunctionInfo::CalculateArgSize() {
maxOptionalArgsSize = ComputeMaxOptionalArgsSize(MF.getTarget(),
MF.getFunction(),
maxOptionalNumArgs);
@@ -86,7 +77,7 @@ void MachineFunctionInfo::CalculateArgSize() {
}
int
-MachineFunctionInfo::computeOffsetforLocalVar(const Value* val,
+SparcV9FunctionInfo::computeOffsetforLocalVar(const Value* val,
unsigned &getPaddedSize,
unsigned sizeToUse)
{
@@ -112,7 +103,7 @@ MachineFunctionInfo::computeOffsetforLocalVar(const Value* val,
}
-int MachineFunctionInfo::allocateLocalVar(const Value* val,
+int SparcV9FunctionInfo::allocateLocalVar(const Value* val,
unsigned sizeToUse) {
assert(! automaticVarsAreaFrozen &&
"Size of auto vars area has been used to compute an offset so "
@@ -132,7 +123,7 @@ int MachineFunctionInfo::allocateLocalVar(const Value* val,
}
int
-MachineFunctionInfo::allocateSpilledValue(const Type* type)
+SparcV9FunctionInfo::allocateSpilledValue(const Type* type)
{
assert(! spillsAreaFrozen &&
"Size of reg spills area has been used to compute an offset so "
@@ -156,7 +147,7 @@ MachineFunctionInfo::allocateSpilledValue(const Type* type)
}
int
-MachineFunctionInfo::pushTempValue(unsigned size)
+SparcV9FunctionInfo::pushTempValue(unsigned size)
{
unsigned align = SizeToAlignment(size, MF.getTarget());
@@ -175,6 +166,6 @@ MachineFunctionInfo::pushTempValue(unsigned size)
return aligned;
}
-void MachineFunctionInfo::popAllTempValues() {
+void SparcV9FunctionInfo::popAllTempValues() {
resetTmpAreaSize(); // clear tmp area to reuse
}