mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-04 02:24:29 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60348 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -34,16 +34,8 @@ void DAGTypeLegalizer::PromoteIntegerResult(SDNode *N, unsigned ResNo) {
|
||||
SDValue Result = SDValue();
|
||||
|
||||
// See if the target wants to custom expand this node.
|
||||
if (TLI.getOperationAction(N->getOpcode(), N->getValueType(ResNo)) ==
|
||||
TargetLowering::Custom) {
|
||||
// If the target wants to, allow it to lower this itself.
|
||||
if (SDNode *P = TLI.ReplaceNodeResults(N, DAG)) {
|
||||
// Everything that once used N now uses P. We are guaranteed that the
|
||||
// result value types of N and the result value types of P match.
|
||||
ReplaceNodeWith(N, P);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (CustomLowerResults(N, ResNo))
|
||||
return;
|
||||
|
||||
switch (N->getOpcode()) {
|
||||
default:
|
||||
@ -949,16 +941,8 @@ void DAGTypeLegalizer::ExpandIntegerResult(SDNode *N, unsigned ResNo) {
|
||||
Lo = Hi = SDValue();
|
||||
|
||||
// See if the target wants to custom expand this node.
|
||||
if (TLI.getOperationAction(N->getOpcode(), N->getValueType(ResNo)) ==
|
||||
TargetLowering::Custom) {
|
||||
// If the target wants to, allow it to lower this itself.
|
||||
if (SDNode *P = TLI.ReplaceNodeResults(N, DAG)) {
|
||||
// Everything that once used N now uses P. We are guaranteed that the
|
||||
// result value types of N and the result value types of P match.
|
||||
ReplaceNodeWith(N, P);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (CustomLowerResults(N, ResNo))
|
||||
return;
|
||||
|
||||
switch (N->getOpcode()) {
|
||||
default:
|
||||
|
Reference in New Issue
Block a user