summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-12 18:29:05 +0000
committerChris Lattner <sabre@nondot.org>2004-08-12 18:29:05 +0000
commit5ff05d724f541573f5ca5847c145abd8f9b5b118 (patch)
tree867441e8fa2733c3dcb3f3da3b98cffa18e62646 /llvm/lib
parent6411ff3c83c9531ecbab0a7781e6a9c94442d7a6 (diff)
downloadbcm5719-llvm-5ff05d724f541573f5ca5847c145abd8f9b5b118.tar.gz
bcm5719-llvm-5ff05d724f541573f5ca5847c145abd8f9b5b118.zip
Instead of a virtual method call, lets try a direct constant reference
llvm-svn: 15696
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp6
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp4
-rw-r--r--llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp5
3 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp b/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp
index 3716edb625d..037cb32c20d 100644
--- a/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp
@@ -2575,7 +2575,7 @@ CreateCodeForFixedSizeAlloca(const TargetMachine& target,
paddedSize,
tsize * numElements);
- if (((int)paddedSize) > 8 * target.getFrameInfo()->getSizeOfEachArgOnStack()||
+ if (((int)paddedSize) > 8 * SparcV9FrameInfo::SizeOfEachArgOnStack ||
!target.getInstrInfo()->constantFitsInImmedField(V9::LDXi,offsetFromFP)) {
CreateCodeForVariableSizeAlloca(target, result, tsize,
ConstantSInt::get(Type::IntTy,numElements),
@@ -3992,7 +3992,7 @@ void GetInstructionsByRule(InstructionNode* subtreeRoot, int ruleForNode,
// not need to be adjusted.
int argOffset = frameInfo.getOutgoingArgOffset(MF, argNo);
if (argType->isFloatingPoint()) {
- unsigned slotSize = frameInfo.getSizeOfEachArgOnStack();
+ unsigned slotSize = SparcV9FrameInfo::SizeOfEachArgOnStack;
assert(argSize <= slotSize && "Insufficient slot size!");
argOffset += slotSize - argSize;
}
@@ -4132,7 +4132,7 @@ void GetInstructionsByRule(InstructionNode* subtreeRoot, int ruleForNode,
Instruction* vaNextI = subtreeRoot->getInstruction();
assert(target.getTargetData().getTypeSize(vaNextI->getType()) <= 8 &&
"We assumed that all LLVM parameter types <= 8 bytes!");
- int argSize = target.getFrameInfo()->getSizeOfEachArgOnStack();
+ unsigned argSize = SparcV9FrameInfo::SizeOfEachArgOnStack;
mvec.push_back(BuildMI(V9::ADDi, 3).addReg(vaNextI->getOperand(0)).
addSImm(argSize).addRegDef(vaNextI));
break;
diff --git a/llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp b/llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
index f2e03589329..5a708083272 100644
--- a/llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
@@ -58,8 +58,8 @@ static unsigned getStaticStackSize (MachineFunction &MF) {
unsigned staticStackSize = MF.getInfo()->getStaticStackSize();
- if (staticStackSize < (unsigned) frameInfo.getMinStackFrameSize())
- staticStackSize = (unsigned) frameInfo.getMinStackFrameSize();
+ if (staticStackSize < SparcV9FrameInfo::MinStackFrameSize)
+ staticStackSize = SparcV9FrameInfo::MinStackFrameSize;
if (unsigned padsz = staticStackSize %
SparcV9FrameInfo::StackFrameSizeAlignment)
staticStackSize += SparcV9FrameInfo::StackFrameSizeAlignment - padsz;
diff --git a/llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp b/llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp
index e3e8a712f49..b01c4fcfc72 100644
--- a/llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -25,6 +25,7 @@
#include "SparcV9Internals.h"
#include "SparcV9RegClassInfo.h"
#include "SparcV9RegInfo.h"
+#include "SparcV9FrameInfo.h"
#include "SparcV9TargetMachine.h"
#include "SparcV9TmpInstr.h"
#include <iostream>
@@ -492,7 +493,7 @@ void SparcV9RegInfo::colorMethodArgs(const Function *Meth,
// a full double-word so the offset does not need to be adjusted.
if (regType == FPSingleRegType) {
unsigned argSize = target.getTargetData().getTypeSize(LR->getType());
- unsigned slotSize = frameInfo.getSizeOfEachArgOnStack();
+ unsigned slotSize = SparcV9FrameInfo::SizeOfEachArgOnStack;
assert(argSize <= slotSize && "Insufficient slot size!");
offsetFromFP += slotSize - argSize;
}
@@ -550,7 +551,7 @@ void SparcV9RegInfo::colorMethodArgs(const Function *Meth,
// a full double-word so the offset does not need to be adjusted.
if (regType == FPSingleRegType) {
unsigned argSize = target.getTargetData().getTypeSize(LR->getType());
- unsigned slotSize = frameInfo.getSizeOfEachArgOnStack();
+ unsigned slotSize = SparcV9FrameInfo::SizeOfEachArgOnStack;
assert(argSize <= slotSize && "Insufficient slot size!");
offsetFromFP += slotSize - argSize;
}
OpenPOWER on IntegriCloud