diff options
| author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-01-11 17:59:34 +0000 |
|---|---|---|
| committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-01-11 17:59:34 +0000 |
| commit | e156e9ba0fe5a6f6c8b4f6e020eb17d947de1ffc (patch) | |
| tree | ce77a5f554c102875aa5863dfcd7d98015ee6b04 | |
| parent | cf0999887a3ecb3fac28e94e00ace5b274c985ff (diff) | |
| download | bcm5719-llvm-e156e9ba0fe5a6f6c8b4f6e020eb17d947de1ffc.tar.gz bcm5719-llvm-e156e9ba0fe5a6f6c8b4f6e020eb17d947de1ffc.zip | |
[Hexagon] Use SetVector when queuing nodes to scan in selectVectorConstants
llvm-svn: 322298
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp index f08c5054065..3618bbc938c 100644 --- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp +++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp @@ -11,6 +11,7 @@ #include "HexagonISelDAGToDAG.h" #include "HexagonISelLowering.h" #include "HexagonTargetMachine.h" +#include "llvm/ADT/SetVector.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/IR/Intrinsics.h" @@ -909,7 +910,7 @@ bool HvxSelector::selectVectorConstants(SDNode *N) { // selection algorithm is not aware of them. Select them directly // here. SmallVector<SDNode*,4> Loads; - SmallVector<SDNode*,16> WorkQ; + SetVector<SDNode*> WorkQ; // The DAG can change (due to CSE) during selection, so cache all the // unselected nodes first to avoid traversing a mutating DAG. @@ -925,7 +926,7 @@ bool HvxSelector::selectVectorConstants(SDNode *N) { return false; }; - WorkQ.push_back(N); + WorkQ.insert(N); for (unsigned i = 0; i != WorkQ.size(); ++i) { SDNode *W = WorkQ[i]; if (IsLoadToSelect(W)) { @@ -933,7 +934,7 @@ bool HvxSelector::selectVectorConstants(SDNode *N) { continue; } for (unsigned j = 0, f = W->getNumOperands(); j != f; ++j) - WorkQ.push_back(W->getOperand(j).getNode()); + WorkQ.insert(W->getOperand(j).getNode()); } for (SDNode *L : Loads) |

