diff options
author | Craig Topper <craig.topper@intel.com> | 2018-07-28 19:44:20 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-07-28 19:44:20 +0000 |
commit | 9db3573d3aa7d91b5d4d766811c5f1ccaa91f39d (patch) | |
tree | cf55c38afd3d6a8a352da06e560f768a3e3f2aae /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 5daa03254637225408c1220e8788125a569872d1 (diff) | |
download | bcm5719-llvm-9db3573d3aa7d91b5d4d766811c5f1ccaa91f39d.tar.gz bcm5719-llvm-9db3573d3aa7d91b5d4d766811c5f1ccaa91f39d.zip |
[SelectionDAG] Pass std::vector by reference instead of by pointer to BuildSDIV/BuildUDIV.
This removes the need for an assert to ensure the pointer isn't null.
Years ago we had ifs the checked the pointer was non-null before very access to the vector. These checks were removed and replaced with a single assert. But a reference seems more suitable here.
llvm-svn: 338205
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 963081c2e95..689ff9eaed2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -17921,7 +17921,7 @@ SDValue DAGCombiner::BuildSDIV(SDNode *N) { std::vector<SDNode *> Built; SDValue S = - TLI.BuildSDIV(N, C->getAPIntValue(), DAG, LegalOperations, &Built); + TLI.BuildSDIV(N, C->getAPIntValue(), DAG, LegalOperations, Built); for (SDNode *N : Built) AddToWorklist(N); @@ -17967,7 +17967,7 @@ SDValue DAGCombiner::BuildUDIV(SDNode *N) { std::vector<SDNode *> Built; SDValue S = - TLI.BuildUDIV(N, C->getAPIntValue(), DAG, LegalOperations, &Built); + TLI.BuildUDIV(N, C->getAPIntValue(), DAG, LegalOperations, Built); for (SDNode *N : Built) AddToWorklist(N); |