[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp SelectionDAGISel.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Tue Sep 26 13:02:56 PDT 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.340 -> 1.341
SelectionDAGISel.cpp updated: 1.279 -> 1.280
---
Log message:

Comments on JumpTableness

---
Diffs of the changes:  (+4 -0)

 SelectionDAG.cpp     |    1 +
 SelectionDAGISel.cpp |    3 +++
 2 files changed, 4 insertions(+)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.340 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.341
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.340	Tue Sep 19 00:02:39 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Tue Sep 26 15:02:30 2006
@@ -2403,6 +2403,7 @@
   case ISD::GlobalAddress: return "GlobalAddress";
   case ISD::FrameIndex:    return "FrameIndex";
   case ISD::JumpTable:     return "JumpTable";
+  case ISD::JumpTableRelocBase: return "JumpTableRelocBase";
   case ISD::ConstantPool:  return "ConstantPool";
   case ISD::ExternalSymbol: return "ExternalSymbol";
   case ISD::INTRINSIC_WO_CHAIN: {


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.279 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.280
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.279	Sun Sep 24 14:44:59 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Tue Sep 26 15:02:30 2006
@@ -868,6 +868,9 @@
   SDOperand LD  = DAG.getLoad(isPIC ? MVT::i32 : PTy, Copy.getValue(1), ADD,
                               DAG.getSrcValue(0));
   if (isPIC) {
+    // For Pic, the sequence is:
+    // BRIND(load(Jumptable + index) + RelocBase)
+    // RelocBase is the JumpTable on PPC and X86, GOT on Alpha
     SDOperand Reloc = DAG.getNode(ISD::JumpTableRelocBase, PTy, TAB);
     ADD = DAG.getNode(ISD::ADD, PTy,
         ((PTy != MVT::i32) ? DAG.getNode(ISD::SIGN_EXTEND, PTy, LD) : LD), Reloc);






More information about the llvm-commits mailing list