Teach DAGCombine to fold constant offsets into GlobalAddress nodes,
[oota-llvm.git] / include / llvm / Target / TargetLowering.h
index 5e5bdbe5116af04777dea209a192239421568782..85e90af5adf20ebaf42af0483b3171172bbd3a26 100644 (file)
@@ -653,6 +653,11 @@ public:
   virtual SDValue getPICJumpTableRelocBase(SDValue Table,
                                              SelectionDAG &DAG) const;
 
+  /// isOffsetFoldingLegal - Return true if folding a constant offset
+  /// with the given GlobalAddress is legal.  It is frequently not legal in
+  /// PIC relocation models.
+  virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
+
   //===--------------------------------------------------------------------===//
   // TargetLowering Optimization Methods
   //