[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h

Evan Cheng evan.cheng at apple.com
Mon Oct 9 13:55:35 PDT 2006



Changes in directory llvm/include/llvm/Target:

TargetLowering.h updated: 1.80 -> 1.81
---
Log message:

Merging ISD::LOAD and ISD::LOADX. Added LoadSDNode to represent load nodes.
Chain and address ptr remains as operands. SrcValue, extending mode, extending
VT (or rather loaded VT before extension) are now instance variables of
LoadSDNode.

Introduce load / store addressing modes to represent pre- and post-indexed
load and store. Also added an additional operand offset that is only used in
post-indexed mode (i.e. base ptr += offset after load/store).

Added alignment info (not yet used) and isVolatile fields.


---
Diffs of the changes:  (+5 -7)

 TargetLowering.h |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.80 llvm/include/llvm/Target/TargetLowering.h:1.81
--- llvm/include/llvm/Target/TargetLowering.h:1.80	Fri Oct  6 17:46:34 2006
+++ llvm/include/llvm/Target/TargetLowering.h	Mon Oct  9 15:55:20 2006
@@ -219,14 +219,12 @@
   /// expanded to some other code sequence, or the target has a custom expander
   /// for it.
   LegalizeAction getOperationAction(unsigned Op, MVT::ValueType VT) const {
-    assert(Op != ISD::LOADX && "Should use getLoadXAction instead");
     return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3);
   }
   
   /// isOperationLegal - Return true if the specified operation is legal on this
   /// target.
   bool isOperationLegal(unsigned Op, MVT::ValueType VT) const {
-    assert(Op != ISD::LOADX && "Should use isLoadXLegal instead");
     return getOperationAction(Op, VT) == Legal ||
            getOperationAction(Op, VT) == Custom;
   }
@@ -545,7 +543,6 @@
   /// with the specified type and indicate what to do about it.
   void setOperationAction(unsigned Op, MVT::ValueType VT,
                           LegalizeAction Action) {
-    assert(Op != ISD::LOADX && "Should use setLoadXAction instead");
     assert(VT < 32 && Op < sizeof(OpActions)/sizeof(OpActions[0]) &&
            "Table isn't big enough!");
     OpActions[Op] &= ~(uint64_t(3UL) << VT*2);
@@ -554,11 +551,12 @@
   
   /// setLoadXAction - Indicate that the specified load with extension does not
   /// work with the with specified type and indicate what to do about it.
-  void setLoadXAction(unsigned LType, MVT::ValueType VT, LegalizeAction Action){
-    assert(VT < 32 && LType < sizeof(LoadXActions)/sizeof(LoadXActions[0]) &&
+  void setLoadXAction(unsigned ExtType, MVT::ValueType VT,
+                      LegalizeAction Action) {
+    assert(VT < 32 && ExtType < sizeof(LoadXActions)/sizeof(LoadXActions[0]) &&
            "Table isn't big enough!");
-    LoadXActions[LType] &= ~(uint64_t(3UL) << VT*2);
-    LoadXActions[LType] |= (uint64_t)Action << VT*2;
+    LoadXActions[ExtType] &= ~(uint64_t(3UL) << VT*2);
+    LoadXActions[ExtType] |= (uint64_t)Action << VT*2;
   }
   
   /// AddPromotedToType - If Opc/OrigVT is specified as being promoted, the






More information about the llvm-commits mailing list