[PATCH] D47735: [DAGCombiner] Create rotates more aggressively
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 18 10:18:47 PDT 2018
lebedev.ri added a comment.
Is this related to https://reviews.llvm.org/D47681 ?
This only has tests for Hexagon, can you please also add test[s] for X86, maybe AArch64?
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:4893
+ SmallVector<SDValue,8> OredOps;
+ std::queue<SDValue> WorkQ;
+ WorkQ.push(Op0);
----------------
You can do
```
std::queue<SDValue, SmallVector<SDValue, 8>> WorkQ;
```
to get the usual small-size-optimization benefits.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:4909
+ // create separate lists of shifts for each shifted value.
+ std::map<int,SmallVector<unsigned,8>> OpMap;
+ for (unsigned I = 0, E = OredOps.size(); I != E; ++I) {
----------------
I would think you'd want `DenseMap` here.
Repository:
rL LLVM
https://reviews.llvm.org/D47735
More information about the llvm-commits
mailing list