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

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 29 20:08:30 PST 2006



Changes in directory llvm/include/llvm/Target:

TargetLowering.h updated: 1.43 -> 1.44
---
Log message:

Move MaskedValueIsZero from the DAGCombiner to the TargetLowering interface,
making isMaskedValueZeroForTargetNode simpler, and useable from other parts
of the compiler.


---
Diffs of the changes:  (+14 -6)

 TargetLowering.h |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.43 llvm/include/llvm/Target/TargetLowering.h:1.44
--- llvm/include/llvm/Target/TargetLowering.h:1.43	Sun Jan 29 21:48:36 2006
+++ llvm/include/llvm/Target/TargetLowering.h	Sun Jan 29 22:08:18 2006
@@ -281,6 +281,17 @@
   }
 
   //===--------------------------------------------------------------------===//
+  // TargetLowering Optimization Methods
+  //
+  
+  /// MaskedValueIsZero - Return true if 'Op & Mask' is known to be zero.  We
+  /// use this predicate to simplify operations downstream.  Op and Mask are
+  /// known to be the same type.  Targets can implement the 
+  /// isMaskedValueZeroForTargetNode method, to allow target nodes to be
+  /// understood.
+  bool MaskedValueIsZero(const SDOperand &Op, uint64_t Mask) const;
+
+  //===--------------------------------------------------------------------===//
   // TargetLowering Configuration Methods - These methods should be invoked by
   // the derived class constructor to configure this object for the target.
   //
@@ -413,12 +424,9 @@
   virtual const char *getTargetNodeName(unsigned Opcode) const;
 
   /// isMaskedValueZeroForTargetNode - Return true if 'Op & Mask' is known to
-  /// be zero. Op is expected to be a target specific node. Used by DAG
-  /// combiner.  MVIZ is a function pointer to the main MaskedValueIsZero
-  /// function.
-  typedef bool (*MVIZFnPtr)(const SDOperand&, uint64_t, const TargetLowering &);
-  virtual bool isMaskedValueZeroForTargetNode(const SDOperand &Op,uint64_t Mask,
-                                              MVIZFnPtr MVIZ) const;
+  /// be zero. Op is expected to be a target specific node.
+  virtual bool isMaskedValueZeroForTargetNode(const SDOperand &Op,
+                                              uint64_t Mask) const;
 
   //===--------------------------------------------------------------------===//
   // Inline Asm Support hooks






More information about the llvm-commits mailing list