Changes in directory llvm/include/llvm/Target:

TargetLowering.h updated: 1.70 -> 1.71
---
Log message:

Add some new methods for computing sign bit information.


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

 TargetLowering.h |   13 +++++++++++++
 1 files changed, 13 insertions(+)


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.70 
llvm/include/llvm/Target/TargetLowering.h:1.71
--- llvm/include/llvm/Target/TargetLowering.h:1.70      Tue May  2 20:29:56 2006
+++ llvm/include/llvm/Target/TargetLowering.h   Sat May  6 04:26:22 2006
@@ -389,6 +389,19 @@
                                               uint64_t &KnownOne,
                                               unsigned Depth = 0) const;
 
+  /// ComputeNumSignBits - Return the number of times the sign bit of the
+  /// register is replicated into the other bits.  We know that at least 1 bit
+  /// is always equal to the sign bit (itself), but other cases can give us
+  /// information.  For example, immediately after an "SRA X, 2", we know that
+  /// the top 3 bits are all equal to each other, so we return 3.
+  unsigned ComputeNumSignBits(SDOperand Op, unsigned Depth = 0) const;
+  
+  /// ComputeNumSignBitsForTargetNode - This method can be implemented by
+  /// targets that want to expose additional information about sign bits to the
+  /// DAG Combiner.
+  virtual unsigned ComputeNumSignBitsForTargetNode(SDOperand Op,
+                                                   unsigned Depth = 0) const;
+  
   struct DAGCombinerInfo {
     void *DC;  // The DAG Combiner object.
     bool BeforeLegalize;



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to