[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelPattern.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Sun Feb 6 21:07:15 PST 2005



Changes in directory llvm/lib/Target/Alpha:

AlphaISelPattern.cpp updated: 1.39 -> 1.40
---
Log message:

teach all loads and stores about the stack

---
Diffs of the changes:  (+41 -1)

 AlphaISelPattern.cpp |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.39 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.40
--- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.39	Sun Feb  6 15:07:31 2005
+++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp	Sun Feb  6 23:07:00 2005
@@ -125,7 +125,7 @@
   
   //  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 @@
         Opc = GetSymVersion(Opc);
         BuildMI(BB, Opc, 1, Result).addConstantPoolIndex(CP->getIndex());
       }
+      else if(Address.getOpcode() == ISD::FrameIndex)
+        {
+          Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+          BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31);
+        }
       else
         {
           long offset;
@@ -505,6 +510,11 @@
           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<FrameIndexSDNode>(Address)->getIndex();
+          BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31);
+        }
       else
         {
           long offset;
@@ -636,6 +646,11 @@
           Opc = GetSymVersion(Opc);
           BuildMI(BB, Opc, 1, Result).addConstantPoolIndex(CP->getIndex());
         }
+      else if(Address.getOpcode() == ISD::FrameIndex)
+        {
+          Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+          BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31);
+        }
       else
         {
           long offset;
@@ -677,6 +692,11 @@
         Opc = GetSymVersion(Opc);
          BuildMI(BB, Opc, 1, Result).addConstantPoolIndex(CP->getIndex());
       }
+      else if(Address.getOpcode() == ISD::FrameIndex)
+        {
+          Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+          BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31);
+        }
       else
         {
           long offset;
@@ -719,6 +739,11 @@
         Opc = GetSymVersion(Opc);
         BuildMI(BB, Opc, 1, Result).addConstantPoolIndex(CP->getIndex());
       }
+      else if(Address.getOpcode() == ISD::FrameIndex)
+        {
+          Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+          BuildMI(BB, Opc, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31);
+        }
       else
         {
           long offset;
@@ -1247,6 +1272,11 @@
         AlphaLowering.restoreGP(BB);
         BuildMI(BB, Alpha::LDQ_SYM, 1, Result).addConstantPoolIndex(CP->getIndex());
       }
+      else if(Address.getOpcode() == ISD::FrameIndex)
+        {
+          Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+          BuildMI(BB, Alpha::LDQ, 2, Result).addFrameIndex(Tmp1).addReg(Alpha::F31);
+        }
       else
         {
           long offset;
@@ -1374,6 +1404,11 @@
           Opc = GetSymVersion(Opc);
           BuildMI(BB, Opc, 2).addReg(Tmp1).addGlobalAddress(cast<GlobalAddressSDNode>(Address)->getGlobal());
         }
+      else if(Address.getOpcode() == ISD::FrameIndex)
+        {
+          Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+          BuildMI(BB, Opc, 3).addReg(Tmp1).addFrameIndex(Tmp1).addReg(Alpha::F31);
+        }
       else
         {
           long offset;
@@ -1419,6 +1454,11 @@
           Opc = GetSymVersion(Opc);
           BuildMI(BB, Opc, 2).addReg(Tmp1).addGlobalAddress(cast<GlobalAddressSDNode>(Address)->getGlobal());
         }
+      else if(Address.getOpcode() == ISD::FrameIndex)
+        {
+          Tmp1 = cast<FrameIndexSDNode>(Address)->getIndex();
+          BuildMI(BB, Opc, 3).addReg(Tmp1).addFrameIndex(Tmp1).addReg(Alpha::F31);
+        }
       else
         {
           long offset;






More information about the llvm-commits mailing list