diff options
| author | Quentin Colombet <qcolombet@apple.com> | 2013-07-30 00:24:09 +0000 |
|---|---|---|
| committer | Quentin Colombet <qcolombet@apple.com> | 2013-07-30 00:24:09 +0000 |
| commit | 6bf4baa408c7042df5791adce351b317e5635e21 (patch) | |
| tree | b3013d49a8af3a28c099013010b514ec1c22f47d /llvm/lib/IR/PassRegistry.cpp | |
| parent | 6e10f149c4d0ec6fd8b0c6012b6c4d70dccb586d (diff) | |
| download | bcm5719-llvm-6bf4baa408c7042df5791adce351b317e5635e21.tar.gz bcm5719-llvm-6bf4baa408c7042df5791adce351b317e5635e21.zip | |
[DAGCombiner] insert_vector_elt: Avoid building a vector twice.
This patch prevents the following combine when the input vector is used more
than once.
insert_vector_elt (build_vector elt0, ..., eltN), NewEltIdx, idx
=>
build_vector elt0, ..., NewEltIdx, ..., eltN
The reasons are:
- Building a vector may be expensive, so try to reuse the existing part of a
vector instead of creating a new one (think big vectors).
- elt0 to eltN now have two users instead of one. This may prevent some other
optimizations.
llvm-svn: 187396
Diffstat (limited to 'llvm/lib/IR/PassRegistry.cpp')
0 files changed, 0 insertions, 0 deletions

