diff options
| author | Duncan Sands <baldrick@free.fr> | 2008-12-01 11:39:25 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2008-12-01 11:39:25 +0000 |
| commit | 6ed40141f7e3ea38589b67fd15ac48b93c1c8fa1 (patch) | |
| tree | 7f90bca20dd394c87578655b48dd1ec8040fe7f6 /llvm/lib/Target/CellSPU | |
| parent | 47f733e4ea52340b781db2af19e3ed695c5f27b0 (diff) | |
| download | bcm5719-llvm-6ed40141f7e3ea38589b67fd15ac48b93c1c8fa1.tar.gz bcm5719-llvm-6ed40141f7e3ea38589b67fd15ac48b93c1c8fa1.zip | |
Change the interface to the type legalization method
ReplaceNodeResults: rather than returning a node which
must have the same number of results as the original
node (which means mucking around with MERGE_VALUES,
and which is also easy to get wrong since SelectionDAG
folding may mean you don't get the node you expect),
return the results in a vector.
llvm-svn: 60348
Diffstat (limited to 'llvm/lib/Target/CellSPU')
| -rw-r--r-- | llvm/lib/Target/CellSPU/SPUISelLowering.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Target/CellSPU/SPUISelLowering.h | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp index 6e64caecb41..bca8a4104f8 100644 --- a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp +++ b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp @@ -2866,7 +2866,9 @@ SPUTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) return SDValue(); } -SDNode *SPUTargetLowering::ReplaceNodeResults(SDNode *N, SelectionDAG &DAG) +void SPUTargetLowering::ReplaceNodeResults(SDNode *N, + SmallVectorImpl<SDValue>&Results, + SelectionDAG &DAG) { #if 0 unsigned Opc = (unsigned) N->getOpcode(); @@ -2885,7 +2887,6 @@ SDNode *SPUTargetLowering::ReplaceNodeResults(SDNode *N, SelectionDAG &DAG) #endif /* Otherwise, return unchanged */ - return 0; } //===----------------------------------------------------------------------===// diff --git a/llvm/lib/Target/CellSPU/SPUISelLowering.h b/llvm/lib/Target/CellSPU/SPUISelLowering.h index a252ee37a58..fefaa683cba 100644 --- a/llvm/lib/Target/CellSPU/SPUISelLowering.h +++ b/llvm/lib/Target/CellSPU/SPUISelLowering.h @@ -113,9 +113,10 @@ namespace llvm { //! Custom lowering hooks virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG); - //! Provide custom lowering hooks for nodes with illegal result types. - SDNode *ReplaceNodeResults(SDNode *N, SelectionDAG &DAG); - + //! Custom lowering hook for nodes with illegal result types. + virtual void ReplaceNodeResults(SDNode *N, SmallVectorImpl<SDValue>&Results, + SelectionDAG &DAG); + virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const; virtual void computeMaskedBitsForTargetNode(const SDValue Op, |

