diff options
| author | Florian Hahn <flo@fhahn.com> | 2019-03-21 14:32:09 +0000 | 
|---|---|---|
| committer | Florian Hahn <flo@fhahn.com> | 2019-03-21 14:32:09 +0000 | 
| commit | 71033f29873626604787002972c1609295619616 (patch) | |
| tree | 15c343659e5320398de3a0495fbd0a1947e8095e /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
| parent | da4992bf8ddb1586268c1aea8dbc6caa81b95030 (diff) | |
| download | bcm5719-llvm-71033f29873626604787002972c1609295619616.tar.gz bcm5719-llvm-71033f29873626604787002972c1609295619616.zip | |
[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
llvm-svn: 356668
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 093da6f6e40..5d7ed8ab5c3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1865,9 +1865,9 @@ SDValue DAGCombiner::visitTokenFactor(SDNode *N) {            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(SmallVectorImpl<MemOpLink> &StoreNodes,    }    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(LSBaseSDNode *N, SDValue OldChain) {      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 { | 

