From: Andrew Lenharth Date: Mon, 7 Feb 2005 05:07:00 +0000 (+0000) Subject: teach all loads and stores about the stack X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0538034a8296c468826a2869d4ca6800570d430c;p=oota-llvm.git teach all loads and stores about the stack git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20058 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp index ca68f60bbc8..2891e7bb1df 100644 --- a/lib/Target/Alpha/AlphaISelPattern.cpp +++ b/lib/Target/Alpha/AlphaISelPattern.cpp @@ -125,7 +125,7 @@ AlphaTargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) // assert(0 && "TODO"); MachineFunction &MF = DAG.getMachineFunction(); - MachineFrameInfo *MFI = MF.getFrameInfo(); + MachineFrameInfo*MFI = MF.getFrameInfo(); GP = MF.getSSARegMap()->createVirtualRegister(getRegClassFor(MVT::i64)); MachineBasicBlock& BB = MF.front(); @@ -442,6 +442,11 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result) Opc = GetSymVersion(Opc); BuildMI(BB, Opc, 1, Result).addConstantPoolIndex(CP->getIndex()); } + else if(Address.getOpcode() == ISD::FrameIndex) + { + Tmp1 = cast(Address)->getIndex(); + BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31); + } else { long offset; @@ -505,6 +510,11 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result) BuildMI(BB, Alpha::LDS_SYM, 1, Tmp2).addConstantPoolIndex(CP->getIndex()); BuildMI(BB, Alpha::CVTST, 1, Result).addReg(Tmp2); } + else if(Address.getOpcode() == ISD::FrameIndex) + { + Tmp1 = cast(Address)->getIndex(); + BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31); + } else { long offset; @@ -636,6 +646,11 @@ unsigned ISel::SelectExpr(SDOperand N) { Opc = GetSymVersion(Opc); BuildMI(BB, Opc, 1, Result).addConstantPoolIndex(CP->getIndex()); } + else if(Address.getOpcode() == ISD::FrameIndex) + { + Tmp1 = cast(Address)->getIndex(); + BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31); + } else { long offset; @@ -677,6 +692,11 @@ unsigned ISel::SelectExpr(SDOperand N) { Opc = GetSymVersion(Opc); BuildMI(BB, Opc, 1, Result).addConstantPoolIndex(CP->getIndex()); } + else if(Address.getOpcode() == ISD::FrameIndex) + { + Tmp1 = cast(Address)->getIndex(); + BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31); + } else { long offset; @@ -719,6 +739,11 @@ unsigned ISel::SelectExpr(SDOperand N) { Opc = GetSymVersion(Opc); BuildMI(BB, Opc, 1, Result).addConstantPoolIndex(CP->getIndex()); } + else if(Address.getOpcode() == ISD::FrameIndex) + { + Tmp1 = cast(Address)->getIndex(); + BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31); + } else { long offset; @@ -1247,6 +1272,11 @@ unsigned ISel::SelectExpr(SDOperand N) { AlphaLowering.restoreGP(BB); BuildMI(BB, Alpha::LDQ_SYM, 1, Result).addConstantPoolIndex(CP->getIndex()); } + else if(Address.getOpcode() == ISD::FrameIndex) + { + Tmp1 = cast(Address)->getIndex(); + BuildMI(BB, Alpha::LDQ, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31); + } else { long offset; @@ -1374,6 +1404,11 @@ void ISel::Select(SDOperand N) { Opc = GetSymVersion(Opc); BuildMI(BB, Opc, 2).addReg(Tmp1).addGlobalAddress(cast(Address)->getGlobal()); } + else if(Address.getOpcode() == ISD::FrameIndex) + { + Tmp1 = cast(Address)->getIndex(); + BuildMI(BB, Opc, 3).addReg(Tmp1).addFrameIndex(Tmp1).addReg(Alpha::F31); + } else { long offset; @@ -1419,6 +1454,11 @@ void ISel::Select(SDOperand N) { Opc = GetSymVersion(Opc); BuildMI(BB, Opc, 2).addReg(Tmp1).addGlobalAddress(cast(Address)->getGlobal()); } + else if(Address.getOpcode() == ISD::FrameIndex) + { + Tmp1 = cast(Address)->getIndex(); + BuildMI(BB, Opc, 3).addReg(Tmp1).addFrameIndex(Tmp1).addReg(Alpha::F31); + } else { long offset;