introduce a new RoundUpAlignment helper function, use it to
[oota-llvm.git] / include / llvm / Target / TargetLowering.h
index 43504842074c5e5b60f9b2cfd825dddf9563f6d2..073cb457d04f72174cf520ea7ae5bd66519f4a48 100644 (file)
@@ -1130,17 +1130,18 @@ public:
   /// implement this.  The default implementation of this aborts.
   virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG);
 
-  /// ReplaceNodeResults - This callback is invoked for operations that are
-  /// unsupported by the target, which are registered to use 'custom' lowering,
-  /// and whose result type is illegal.  This must return a node whose results
-  /// precisely match the results of the input node.  This typically involves a
-  /// MERGE_VALUES node and/or BUILD_PAIR.
+  /// ReplaceNodeResults - This callback is invoked when a node result type is
+  /// illegal for the target, and the operation was registered to use 'custom'
+  /// lowering for that result type.  The target places new result values for
+  /// the node in Results (their number and types must exactly match those of
+  /// the original return values of the node), or leaves Results empty, which
+  /// indicates that the node is not to be custom lowered after all.
   ///
   /// If the target has no operations that require custom lowering, it need not
   /// implement this.  The default implementation aborts.
-  virtual SDNode *ReplaceNodeResults(SDNode *N, SelectionDAG &DAG) {
+  virtual void ReplaceNodeResults(SDNode *N, SmallVectorImpl<SDValue> &Results,
+                                  SelectionDAG &DAG) {
     assert(0 && "ReplaceNodeResults not implemented for this target!");
-    return 0;
   }
 
   /// IsEligibleForTailCallOptimization - Check whether the call is eligible for
@@ -1170,7 +1171,7 @@ public:
   }
 
   /// GetPossiblePreceedingTailCall - Get preceeding TailCallNodeOpCode node if
-  /// it exists skip possible ISD:TokenFactor.
+  /// it exists. Skip a possible ISD:TokenFactor.
   static SDValue GetPossiblePreceedingTailCall(SDValue Chain,
                                                  unsigned TailCallNodeOpCode) {
     if (Chain.getOpcode() == TailCallNodeOpCode) {