[VectorCombine] add/use pass-level IRBuilder
authorSanjay Patel <spatel@rotateright.com>
Mon, 22 Jun 2020 12:57:37 +0000 (08:57 -0400)
committerSanjay Patel <spatel@rotateright.com>
Mon, 22 Jun 2020 13:01:29 +0000 (09:01 -0400)
commitde65b356dc2d9730b02ac21dd308cdc3ced0feac
treed9e9e66093c17b645ea38d746b1b21d3e211d209
parent9761d3cf9c1f996d7b6571d52859e71da2d992c9
[VectorCombine] add/use pass-level IRBuilder

This saves creating/destroying a builder every time we
perform some transform.

The tests show instruction ordering diffs resulting from
always inserting at the root instruction now, but those
should be benign.
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
llvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
llvm/test/Transforms/VectorCombine/X86/extract-binop.ll