diff options
author | Chris Lattner <sabre@nondot.org> | 2007-11-24 07:07:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-11-24 07:07:01 +0000 |
commit | 27a6c7380fa4dfc8e1837a8dd67967d063b26544 (patch) | |
tree | b2375fe38bafc33f9fa95eeeb37e92789700b941 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 94613166b71fd5ed6d76f519cd0b1834689a217c (diff) |
Several changes:
1) Change the interface to TargetLowering::ExpandOperationResult to
take and return entire NODES that need a result expanded, not just
the value. This allows us to handle things like READCYCLECOUNTER,
which returns two values.
2) Implement (extremely limited) support in LegalizeDAG::ExpandOp for MERGE_VALUES.
3) Reimplement custom lowering in LegalizeDAGTypes in terms of the new
ExpandOperationResult. This makes the result simpler and fully
general.
4) Implement (fully general) expand support for MERGE_VALUES in LegalizeDAGTypes.
5) Implement ExpandOperationResult support for ARM f64->i64 bitconvert and ARM
i64 shifts, allowing them to work with LegalizeDAGTypes.
6) Implement ExpandOperationResult support for X86 READCYCLECOUNTER and FP_TO_SINT,
allowing them to work with LegalizeDAGTypes.
LegalizeDAGTypes now passes several more X86 codegen tests when enabled and when
type legalization in LegalizeDAG is ifdef'd out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ade0a2860b..270c9a958f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1921,7 +1921,7 @@ unsigned SelectionDAGLowering::Clusterify(CaseVector& Cases, if (Cases.size()>=2) // Must recompute end() each iteration because it may be // invalidated by erase if we hold on to it - for (CaseItr I=Cases.begin(), J=next(Cases.begin()); J!=Cases.end(); ) { + for (CaseItr I=Cases.begin(), J=++(Cases.begin()); J!=Cases.end(); ) { int64_t nextValue = cast<ConstantInt>(J->Low)->getSExtValue(); int64_t currentValue = cast<ConstantInt>(I->High)->getSExtValue(); MachineBasicBlock* nextBB = J->BB; @@ -4144,14 +4144,6 @@ SDOperand TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { return SDOperand(); } -std::pair<SDOperand,SDOperand> -TargetLowering::ExpandOperationResult(SDNode *N, SelectionDAG &DAG) { - assert(0 && "ExpandOperation not implemented for this target!"); - abort(); - return std::pair<SDOperand,SDOperand>(); -} - - SDOperand TargetLowering::CustomPromoteOperation(SDOperand Op, SelectionDAG &DAG) { assert(0 && "CustomPromoteOperation not implemented for this target!"); |