[llvm] r356668 - [DAGCombiner] Use getTokenFactor in a few more cases.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 07:32:09 PDT 2019
Author: fhahn
Date: Thu Mar 21 07:32:09 2019
New Revision: 356668
URL: http://llvm.org/viewvc/llvm-project?rev=356668&view=rev
Log:
[DAGCombiner] Use getTokenFactor in a few more cases.
SDNodes can only have 64k operands and for some inputs (e.g. large
number of stores), we can reach this limit when creating TokenFactor
nodes. This patch is a follow up to D56740 and updates a few more places
that potentially can create TokenFactors with too many operands.
Reviewers: efriedma, craig.topper, aemerson, RKSimon
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D59156
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=356668&r1=356667&r2=356668&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Mar 21 07:32:09 2019
@@ -1865,9 +1865,9 @@ SDValue DAGCombiner::visitTokenFactor(SD
if (SeenChains.count(Op.getNode()) == 0)
PrunedOps.push_back(Op);
}
- Result = DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, PrunedOps);
+ Result = DAG.getTokenFactor(SDLoc(N), PrunedOps);
} else {
- Result = DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, Ops);
+ Result = DAG.getTokenFactor(SDLoc(N), Ops);
}
}
return Result;
@@ -14431,7 +14431,7 @@ SDValue DAGCombiner::getMergeStoreChains
}
assert(Chains.size() > 0 && "Chain should have generated a chain");
- return DAG.getNode(ISD::TokenFactor, StoreDL, MVT::Other, Chains);
+ return DAG.getTokenFactor(StoreDL, Chains);
}
bool DAGCombiner::MergeStoresOfConstantsOrVecElts(
@@ -19600,7 +19600,7 @@ SDValue DAGCombiner::FindBetterChain(LSB
return Aliases[0];
// Construct a custom tailored token factor.
- return DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, Aliases);
+ return DAG.getTokenFactor(SDLoc(N), Aliases);
}
namespace {
More information about the llvm-commits
mailing list