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

Evan Cheng evan.cheng at apple.com
Wed May 16 16:44:28 PDT 2007



Changes in directory llvm/include/llvm/Target:

TargetInstrInfo.h updated: 1.119 -> 1.120
TargetLowering.h updated: 1.124 -> 1.125
---
Log message:

Add target hook to specify block size limit for if-conversion.

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

 TargetInstrInfo.h |    5 +++++
 TargetLowering.h  |   16 ++++++++++++++++
 2 files changed, 21 insertions(+)


Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.119 llvm/include/llvm/Target/TargetInstrInfo.h:1.120
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.119	Wed May 16 16:51:06 2007
+++ llvm/include/llvm/Target/TargetInstrInfo.h	Wed May 16 18:44:08 2007
@@ -394,6 +394,11 @@
   virtual bool PredicateInstruction(MachineInstr *MI,
                                     std::vector<MachineOperand> &Cond) const;
 
+  /// getBlockSize - Calculate the size of the specified MachineBasicBlock.
+  /// Note the result may not be 100% accurate especially if there are inline
+  /// asm's in the block.
+  virtual unsigned getBlockSize(MachineBasicBlock *MBB) const;
+
   /// getPointerRegClass - Returns a TargetRegisterClass used for pointer
   /// values.
   virtual const TargetRegisterClass *getPointerRegClass() const {


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.124 llvm/include/llvm/Target/TargetLowering.h:1.125
--- llvm/include/llvm/Target/TargetLowering.h:1.124	Sat Apr 28 00:42:38 2007
+++ llvm/include/llvm/Target/TargetLowering.h	Wed May 16 18:44:08 2007
@@ -434,6 +434,12 @@
     return JumpBufAlignment;
   }
 
+  /// getIfCvtBlockLimit - returns the target specific if-conversion block size
+  /// limit. Any block whose size is greater should not be predicated.
+  virtual unsigned getIfCvtBlockSizeLimit() const {
+    return IfCvtBlockSizeLimit;
+  }
+
   /// getPreIndexedAddressParts - returns true by value, base pointer and
   /// offset pointer and addressing mode by reference if the node's address
   /// can be legally represented as pre-indexed load / store address.
@@ -750,6 +756,12 @@
   void setJumpBufAlignment(unsigned Align) {
     JumpBufAlignment = Align;
   }
+
+  /// setIfCvtBlockSizeLimit - Set the target's if-conversion block size limit;
+  /// default is 2.
+  void setIfCvtBlockSizeLimit(unsigned Limit) {
+    IfCvtBlockSizeLimit = Limit;
+  }
   
 public:
 
@@ -982,6 +994,10 @@
   /// JumpBufAlignment - The alignment, in bytes, of the target's jmp_buf
   /// buffers
   unsigned JumpBufAlignment;
+
+  /// IfCvtBlockSizeLimit - The maximum allowed block size for if-conversion.
+  /// 
+  unsigned IfCvtBlockSizeLimit;
   
   /// StackPointerRegisterToSaveRestore - If set to a physical register, this
   /// specifies the register that llvm.savestack/llvm.restorestack should save






More information about the llvm-commits mailing list